416533 (2) [Avatar] Offline
The book and appendix missed an opportunity to mention that there is a huge open source effort to make a common interface for GPIO access via node JS.

As of 2014, the underpinnings to the Johnny-Five robotics library were switched out from being specific to Arduino to supporting most common platforms via a common IO Class interface: http://johnny-five.io/platform-support/
In fact, there's support for a number of these devices to node red with https://github.com/monteslu/node-red-contrib-gpio

The author of the onoff library used in the book is also very active in the Johnny-Five community.

Vlad Trifa (16) [Avatar] Offline
Hello Luis, thanks for the feedback.

Indeed, there are many options (and especially a huge developing community) for working with GPIOs from JS apps, and agree that we should have also mentioned Johnny Five and others alike.

However, accessing GPIO is only covered in chapter 4 as it isn't a core topic of the book (which focuses on the higher-levels of the WoT, and not how to control devices from Node, or python, or Arduino, etc.). For this reason we took the simplest basic library out there that does what we need and stuck to it. But yes, Johnny Five would have been indeed a very good (and likely better) alternatively, and we'll certainly update this in future versions of the book!