The book Node.js for embedded systems explores how a web technology can change the way we build hardware.
Please help to make the book and website better: Email Us
The book Node.js for embedded systems explores how a web technology can change the way we build hardware.
Please help to make the book and website better: Email Us
The JavaScript ecosystem is famous for its many libraries. This chapters looks closer at Node.js libraries for hardware.
Johnny-Five provides a JavaScript API to work with embedded devices. Originally written for Arduino boards, the library supports many boards right now. The project has an excellent documentation and also supports many components out of the box.
Johnny-five supports different boards (such as Arduino, Tessel, Intel Edison, ... ) with help of IO adapters.
The Tessel 2 provides low-level libraries for analog and digital signals. Also, you can use every Node.js library you find on npm.js.
Sparkfun has a nice collection of experiments with a Tessel 2. For example:
One good place to learn about acommunication protocols is here:
In case you need to work with data from an embedded device directly, serial ports are very helpful. With serialports, you can transfer data from one device to another. A good place to start with serial communication with Node.js is the serialport library. The GitHub project can be found at Node serialport library
This blog post shows some example usage of Node serial port. Another nice post is at Makezine.
Also, there is the Arduino's Experimenters guide for Node.js with examples on the serial port.
Another library to build network systems and robots is the Cylon.js library.
Cylon supports many different hardware boards via serial communication or Firmata. For example, you can see a setup with a Linkit DUO.
A good place to learn about JavaScript integration with lower level C or C++ code is the MRAA lib. With this library, you also can control pins for PWM and communication with Node.js
//www.npmjs.com/package/jsupm_joystick12
These links may be useful to get started with Node.js and embedded systems.
If you find new links or broken links, please let us know.