npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

tessel-io

v1.3.0

Published

Tessel 2 IO Plugin for Johnny-Five JavaScript Robotics

Downloads

164

Readme

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 Version | Tessel-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.

| Port | Number | Johnny-Five Compatible 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" | | L | 0 | "l0" or "L0" | | L | 1 | "l1" or "L1" | | L | 2 | "l2" or "L2" | | L | 3 | "l3" or "L3" |

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

Pin Capabilities Guide

Originally written for Tessel 2's Firmware Docs

| Port | Pin | 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 | ✓ | | | | | ✓ | ✓ | ✓ | |

Notes:

  • Whenever possible, avoid using pins AO, A1, B0 and B1 for digital or analog input.

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!