Beaglebone green wireless gateway


Can someone write a script to function block to read analog value using A0 pin ?
Johhny5 function blocks crashes my node-red

Best regards

Do you have latest node-red?

You could enable functionExternalModuels (see Function node use of npm modules) then add references to johnny-five and beaglebone-io in the setup tab of the function node. Then you write a function like so...

var five = require('johnny-five');
var BeagleBone = require('beaglebone-io');

var board = new five.Board({
    io: new BeagleBone()

board.on('ready', function () {
    // connect a Led on pin P9_14 of the beaglebone
    var led = new five.Led('P9_14');
    // this allows access to the led while the program is running
    this.repl.inject({ led: led });

See here for more info: Starting with Johnny-Five on the BeagleBone - MORPHOCODE

Thank you for information Steve.

Yes, I am using latest node-red version.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.