concept Tessel in category javascript

appears as: Tessel, Tessel, The Tessel, Tessel, A Tessel
JavaScript on Things: Hacking hardware for web developers

This is an excerpt from Manning's book JavaScript on Things: Hacking hardware for web developers.

Another example of embedded JavaScript is the Tessel 2 (https://tessel.io/), a Node.js-based development platform. You can control and deploy code to your Tessel using the tessel-cli npm module—wirelessly, if you like, because Tessel 2 has built-in WiFi (figure 1.15).

Figure 1.15. The Tessel 2 is an open source platform that runs Node.js natively.

8.2. Toward wires-free projects using the Tessel 2

The Tessel 2 (https://tessel.io/) is an open source development platform (both the hardware and the software are open source) centered around Node.js and the npm package manager (figure 8.4). In addition to the kinds of basic I/O you’ve come to rely on—digital, analog, PWM, I2C, and so on—the Tessel 2 also has a few higher-level peripheral goodies, like USB ports, Ethernet, and—hooray!—WiFi. (The Tessel 2 is the only Tessel model currently available, so I’ll generally just refer to it as the Tessel.)

Figure 8.4. The Tessel 2 open source development board

The Tessel is an interesting and useful piece of hardware. Based on the “can run a real OS” criterion, it’d fall in the SBC category of devices—it ships with OpenWrt, a Linux distribution commonly found on routers, preinstalled.

But the development workflow is more reminiscent of host-client setups and embedded-JavaScript devices: you write code on your computer and deploy to the Tessel, as opposed to writing code on it. And although the Tessel runs OpenWrt and comes with some nifty software goodies that we’ll check out in a bit, it’s more constrained than SBC platforms like Raspberry Pis. It only has 64 MB of RAM and 32 MB of Flash space for programs. That’s leagues beyond what’s available on ATmega328P-based boards like the Uno, but it’s not in the same ballpark as a typical desktop computer.

After developing projects with Johnny-Five for the Uno, you’ll find many of the ergonomics with the Tessel familiar. Indeed, the mechanics of working with the Tessel will feel old hat if you’re used to developing with or for Node.js in general.

There’s one difference between the Tessel and the Arduino Uno that’s essential to note: the Tessel operates at 3.3 V versus the Uno’s 5 V.

Tessel 2 is 3.3 V

It’s usually easy to get a Tessel on a typical 2.4 GHz home WiFi network with a single command. But be aware, Tessels aren’t, at this time, compatible with 5 GHz networks. If you run into trouble, head over to Tessel’s WiFi connection setup page (http://tessel.github.io/t2-start/wifi.html) for more connection info.

Finally, provision the Tessel so that you can send code to it from your computer over WiFi:

$ t2 provision

The output of the t2 list command after provisioning should show the Tessel as available both on a USB connection and over WiFi (LAN), as shown in the next listing.

In chapter 6, the roving robot’s motors were powered with a 9 V battery. The Tessel’s 3.3 V operating voltage is too low to power the motors—and besides, the current restrictions on the pins would be problematic. But Tessel boards provide access to 5 V power with enough current to get the job done (figure 8.14). The trick is accessing it—you’ll need to do a bit of soldering.

Figure 8.14. The Tessel can provide 5 V power from the power pins highlighted here.

The most flexible option is to solder female headers to the three power pins on the Tessel, resulting in reusable “sockets” you can plug jumper cables into (8.15).

sitemap

Unable to load book!

The book could not be loaded.

(try again in a couple of minutes)

manning.com homepage
test yourself with a liveTest