[{"id":"c0ec5f33.06047","type":"inject","name":"","topic":"","payload":"1","payloadType":"string","repeat":"","crontab":"","once":false,"x":254.5999755859375,"y":996.3999633789062,"z":"3ac3e7e3.bb80bc","wires":[["e18a9bf1.a08288"]]},{"id":"82b51393.dccf9","type":"debug","name":"","active":true,"console":"false","complete":"false","x":829.7999267578125,"y":1025.2000732421875,"z":"3ac3e7e3.bb80bc","wires":[]},{"id":"66f46563.30fcd4","type":"inject","name":"","topic":"","payload":"0","payloadType":"string","repeat":"","crontab":"","once":false,"x":265,"y":1098,"z":"3ac3e7e3.bb80bc","wires":[["e18a9bf1.a08288"]]},{"id":"e18a9bf1.a08288","type":"function","name":"new","func":"var five = context.global.jfive;\nvar led = new five.Led(13);\ncontext.switch = context.switch || 0;\ncontext.switch = msg.payload;\nif (context.switch == 1) {\nled.blink(500);\n}\nif (context.switch == 0) {\nled.stop().off();\n}\nreturn msg;","outputs":1,"valid":true,"x":523.4000244140625,"y":1024.7999267578125,"z":"3ac3e7e3.bb80bc","wires":[["82b51393.dccf9"]]}]
Does the code in my first reply in this thread not work ?
(Not near computer for a couple of days so can't check myself)
functionGlobalContext: {
// os:require('os'),
// bonescript:require('bonescript'),
jfive:require('johnny-five'),
j5board:require("johnny-five").Board({repl:false})
},