As described in my post "Problem with johnny-five version 2.0" fro May 15, the "new" keyword is required in order to create an instance of the Board class. This keyword cannot be inserted in the corresponding entry in the settings file, even the notation:
j5board:require("johnny-five").(new Board({port: "COM5", repl:false}))
did not function. I think this should be changed in node-red.
However I found a workaround:
- insert in Class Board in johnny-five Board.js the following function:
static create(options = {}) {
return new Board(options);
} - change the settings entry to:
j5board:require("johnny-five").Board.create({port: "COMx", repl:false})
I am not sure about conformity and efficiency concerning the class handling in javascript, but at least the workaround functions.
Nevertheless should node-red allow the new keyword in the settings file.