Sign inSign up

bgloh/node-red

By bgloh

•Updated almost 7 years ago

Image
0

68

bgloh/node-red repository overview

node-red with Johny Five installed.

$ docker run -it -p 1880:1880            \
               --group-add dialout       \
               --device=/dev/ttyACM0     \
               --name mynodered bgloh/node-red:johny-five 

On a new terminal,

$ docker exec -it mynodered   bash

bash-5.0$  cd /data
bash-5.0$  nano settings.js

Edit settings.js and restart node-red

// The following property can be used to seed Global Context with predefined
    // values. This allows extra node modules to be made available with the
    // Function node.
    // For example,
    //    functionGlobalContext: { os:require('os') }
    // can be accessed in a function block as:
    //    global.get("os")
    functionGlobalContext: {
        // os:require('os'),
         jfive:require("johnny-five"),
         j5board:require("johnny-five").Board({repl:false})
    },
    // `global.keys()` returns a list of all properties set in global context.
    // This allows them to be displayed in the Context Sidebar within the editor.
    // In some circumstances it is not desirable to expose them to the editor. The
    // following property can be used to hide any property set in `functionGlobalContext`
    // from being list by `global.keys()`.

Tag summary

Content type

Image

Digest

Size

121.5 MB

Last updated

almost 7 years ago

docker pull bgloh/node-red:johny-five