CPU | MIPS 24KEc 580MHz |
RAM | 64MB |
Flash | 32MB |
WiFi | b/g/n 2.4GHz |
Ethernet | 10/100Mbps |
USB | 2 x USB 2.0 |
MCU | ARM Cortex M0 48MHz |
Create a fully open source hardware & software platform that makes it easy and intuitive to develop Internet-connected devices.
Applications --> Utilities --> Terminal
Click start --> type `command prompt` --> hit enter
node -v
6.11.1 is the latest, but any LTS Version should work
Argon - 4.2.0 - 4.8.4
Boron - 6.9.0 - 6.11.1
npm install -g t2-cli
Note: If you get the common npm EACCES error, correct it by fixing npm permissions and run the command again.
https://docs.npmjs.com/getting-started/fixing-npm-permissions
t2 list
t2 rename mario
t2 provision
mkdir t2_fun && cd t2_fun
t2 init
t2 run index.js
t2 run name_of_file
Copy the file and its dependencies into Tessel's RAM & run immediately. Use this during development of your device application.
Flag | Description |
---|---|
--lan | deploy over LAN connection |
--usb | deploy over USB connection |
--slim | copy only files needed by the program to run |
--full | copy all the files in the project directory |
t2 push index.js
t2 push name_of_file
Copy the file and its dependencies into Tessel's Flash memory & run immediately. Once deployed with push command, the device application will automatically run every time the Tessel restarts.
Flag | Description |
---|---|
--lan | deploy over LAN connection |
--usb | deploy over USB connection |
--slim | copy only files needed by the program to run |
--full | copy all the files in the project directory |
t2 erase
t2 erase
Erase any code previously pushed to the Tessel using the t2 push command.
t2 wifi
t2 wifi -n SSID -p PASSWORD
Flag | Description |
---|---|
-l | list available networks |
-n | network SSID |
-p | password for wifi |
-s | security type (wep, psk, psk2 wpa, wpa2) |
--off | disconnect from wifi |
--on | connect to last configured network |
NOTE: try turning off access point before connecting to wifi.
t2 ap --off
t2 ap -n NAME -p PASSWORD
t2 ap -n SSID -p PASSWORD
Flag | Description |
---|---|
-n | name of network to create |
-p | optional password for network |
-s | optional security type (wep, psk, psk2 wpa, wpa2) |
--off | turn off current access point |
--on | turn on most recent access point |
NOTE: try turning off wifi before creating access point.
t2 wifi --off
npm install johnny-five tessel-io
Mac users:
touch led-on.js
Windows users:
type nul > led-on.js
Connect positive lead (long) to pin A0 and the negative lead (short) to ground.
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("A0");
led.on();
});
t2 run led-on.js
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("A0");
led.blink();
});
t2 run led-blink.js
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("A0");
led.blink(2500); // <-- ms on/off phases
});
t2 run led-blink-slow.js
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var button = new five.Button("A2");
button.on("press", function() { console.log("Button Pressed!")});
button.on("release", function() { console.log("Button Released!")});
});
t2 run button.js
Instead of the run command, we will use the push command which copies the file on to the tessel and will now run this file at boot on every startup.
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("A5");
var button = new five.Button("A2");
button.on("press", function() { led.on() });
button.on("release", function() { led.off() });
});
t2 push button-led.js
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var led = new five.Led("A5");
var button = new five.Button("A2");
button.on("press", function() { led.on() });
button.on("hold", function() { led.blink(50) });
button.on("release", function() { led.stop().off() });
});
t2 push button-states.js
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var rotary = new five.Sensor("A7");
rotary.on("change", function() {
console.log("Sensor changed!", this.value);
});
});
t2 run sensor.js
Pulse Width Modulation, or PWM, is a technique for getting analog results with digital means.
Digital control
is used to create a square wave, a signal switched between on and off.
- Arduino.cc
var five = require("johnny-five");
var Tessel = require("tessel-io");
var board = new five.Board({
io: new Tessel()
});
board.on("ready", function() {
var sensor = new five.Sensor({
pin: "a7",
threshold: 2
});
var led = new five.Led("b5");
sensor.on("change", () => {
led.brightness(sensor.scaleTo(0, 255));
});
});
t2 run brightness.js
t2 push brightness.js
Unplug the Tessel from your computer and plug it into the USB battery. Wait for the lights on the Ethernet port.