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
This chapters explains the basics of programming an Arduino with JavaScript. Arduino is popular for an easy getting started experience with an embedded device. Start here to find out about pins, analog and digital signals and firmware basics.
From web development perspective, first contact with a microcontroller can be daunting. Take a look at this talk "Between the layers of JavaScript hardware by Suz Hinton" for a nice introduction.
Microcontrollers are different from a microprocessor. To get a feeling for the issues look at this MCU vs MPU white label paper by Atmel. Also, this discussion on Quora Quora answer MCU vs MPU and Quora answer Embedded Linux vs MCU can be helpful.
For many, Arduino is the first contact with a microcontroller. For this, Pinouts for Arduino are helpful. Pinouts can be generated with JavaScript for example as here.
Arduino boards come in all sizes and price ranges. An Arduino Uno is easy to handle without prior experience with electronics. You can get smaller Arduino Pro Mini and smaller here. Also, the Arduino Nano is a nice board, and good collection of offers can be found at mysensors.org
To build basic circuits, you can get some Grove header Nano here.
For people without prior Linux experience, an Arduino can also be a nice tool to explore the Internet of Things as this discussion by the Smart Object team shows.
The core software skills of Arduino relate to using a C++ compiler. You can setup the build toolchain yourself work with Arduino without IDE. For example, see here how to compile an Arduino sketch from scratch.
To work with Arduino and JavaScript, you can use the Firmata protocol. Details about the Firmata protocol can be found in the repository @ github. Alternatively, you can work with a serial protocol, as discussed in the Arduino forum Interfacing Arduino with other software - Forum Arduino.
With the Firmata protocol and JavaScript library, you are able to play with most examples from the Arduino IDE in JavaScript. For example, you can control multiple LEDs with a single pin as shown in this example: Port Expander - PCF8575.
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.