Home

Awesome

Tessel-IO

Travis-CI Build Status Coverage Status

Tessel-IO is compatible with Tessel 2

Tessel-IO is an IO Plugin that enables writing JavaScript Robotics programs with Johnny-Five, that run on a Tessel 2. This project was built at Bocoup

Tessel 2

IMPORTANT VERSION COMPATIBILTY INFORMATION

Tessel 2 Firmware VersionTessel-IO Version
>= 0.1.0>= 1.0.0
<= 0.0.16<= 0.11.0

Install & Setup

If you have prior experience with Johnny-Five, this is all you need:

npm install t2-cli tessel-io johnny-five

If you have limited prior experience with Johnny-Five, or are generally new to NodeBots, or just want to read more about how this all works together, you'll want to read Say 'Hello World' with Johnny-Five on Tessel 2

Boilerplate Program

"use strict";

const five = require("johnny-five");
const Tessel = require("tessel-io");
const board = new five.Board({
  io: new Tessel()
});

board.on("ready", () => {
  // Write your program locally and push to the Tessel 2 when ready!
});

Deploying Your Program To Tessel 2

For testing and development, run in RAM:

t2 run <program file name>

When your program is ready for deployment, push to flash:

t2 push <program file name>

Pin Naming Guide

There are two primary ports on the Tessel2: Port "A" and Port "B". There is also a bank of onboard LEDs which are controllable from a port we are calling "L". Note that "L0" and "L1" should be reserved for system functions (ERR and WLAN) so you should avoid using them. Instead, consider using "L2" and "L3" which are intended to be more informational in nature.

PortNumberJohnny-Five Compatible Name
A0"a0" or "A0"
A1"a1" or "A1"
A2"a2" or "A2"
A3"a3" or "A3"
A4"a4" or "A4"
A5"a5" or "A5"
A6"a6" or "A6"
A7"a7" or "A7"
B0"b0" or "B0"
B1"b1" or "B1"
B2"b2" or "B2"
B3"b3" or "B3"
B4"b4" or "B4"
B5"b5" or "B5"
B6"b6" or "B6"
B7"b7" or "B7"
L0"l0" or "L0"
L1"l1" or "L1"
L2"l2" or "L2"
L3"l3" or "L3"

See examples for basic, non-Johnny-Five examples.

Pin Capabilities Guide

Originally written for Tessel 2's Firmware Docs

PortPinDigital I/OSCLSDATXRXAnalog InAnalog OutInterruptPWMPull Up/Down
A0
A1
A2
A3
A4
A5
A6
A7
B0
B1
B2
B3
B4
B5
B6
B7

Notes:

Examples

There are several examples of how to use this library in its raw form. Make sure you have installed the Tessel 2 CLI and provisioned the board first. After that is complete, you can run any of the examples:

t2 run eg/onboard-led.js

This is an early "platform preview" and is not yet guaranteed to function correctly. Please report any bugs or issues that you encounter!