Experiment Guide for the Johnny-Five Inventor's Kit
Ports and Pins on the Tessel 2
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. 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.
7on Port A support analog-to-digital input. All pins on Port B support analog input.
6on both ports support Pulse-Width Modulation (PWM).
1on both ports can be used for I2C serial communication.
- Serial TX/RX (hardware UART) is available on both port, pins
- 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|