Getting Started with the Tessel 2
Board Details
The Tessel 2 has two IO modules, Port A and Port B. Each port has 8 GPIO (general-purpose I/O) pins. Here's their naming conventions and what all of them do.
Pin Naming Conventions
The pins on the Tessel 2 are broken out across the two different ports. The naming conventions in code will be referenced with the port letter first and then the pin number of that port. The port letter is not case sensitive! As an example, the first pin on port A would be referred to as pin a0
or A0
. Use this table as a reference in terms of the naming of pins.
Port | Pin Number | Johnny-Five Name |
---|---|---|
A | 0 | "a0" or "A0" |
A | 1 | "a1" or "A1" |
A | 2 | "a2" or "A2" |
A | 3 | "a3" or "A3" |
A | 4 | "a4" or "A4" |
A | 5 | "a5" or "A5" |
A | 6 | "a6" or "A6" |
A | 7 | "a7" or "A7" |
B | 0 | "b0" or "B0" |
B | 1 | "b1" or "B1" |
B | 2 | "b2" or "B2" |
B | 3 | "b3" or "B3" |
B | 4 | "b4" or "B4" |
B | 5 | "b5" or "B5" |
B | 6 | "b6" or "B6" |
B | 7 | "b7" or "B7" |
Pin Capabilities: What Each Pin Can Do
The pins of each port have different functionalities available to them.
Other things to know:
- All eight numbered pins, both ports (16 total), can be used as GPIO.
- Pins
4
and7
on Port A support analog-to-digital input. All pins on Port B support analog input. - Pins
5
and6
on both ports support Pulse-Width Modulation (PWM). - Pins
0
and1
on both ports can be used for I2C serial communication. - Serial TX/RX (hardware UART) is available on both port, pins
5
(TX) and6
(RX). - Port B, Pin
7
: Supports digital-to-analog conversion (DAC)
The two ports are essentially duplicates, with the following exceptions:
- Port B: All numbered pins can be used for analog input.
- Port B, Pin
7
: Supports DAC.
For exhaustive details, see the pin functionality reference chart below:
Port | Pin Number | Digital I/O | SCL | SDA | TX | RX | Analog In | Analog Out | Interrupt | PWM |
---|---|---|---|---|---|---|---|---|---|---|
A | 0 | |||||||||
A | 1 | |||||||||
A | 2 | |||||||||
A | 3 | |||||||||
A | 4 | |||||||||
A | 5 | |||||||||
A | 6 | |||||||||
A | 7 | |||||||||
B | 0 | |||||||||
B | 1 | |||||||||
B | 2 | |||||||||
B | 3 | |||||||||
B | 4 | |||||||||
B | 5 | |||||||||
B | 6 | |||||||||
B | 7 |