The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

416533 (2) [Avatar] Offline
#1
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.

-Luis
Vlad Trifa (16) [Avatar] Offline
#2
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!