[error] [arduino-board:a18a8fd1.7239a] TypeError: Cannot call method 'on' of null

314 views
Skip to first unread message

arnaud fontaine

unread,
Apr 2, 2017, 1:18:57 PM4/2/17
to Node-RED
Unable to use Arduino with node-red on Raspberry-pi.

I installed firmata and node-red-node-arduino like defined on the site : https://nodered.org/docs/hardware/arduino.
I tried the blink flow defined on the site but some errors appeared :

[error] [arduino-board:a18a8fd1.7239a] TypeError: Cannot call method 'on' of null
[error] [arduino out:d5a7e64e.9d8448] TypeError: Cannot read property 'board' of null


I searched the solution without success.

An idea ?

Mark Setrem

unread,
Apr 2, 2017, 3:10:42 PM4/2/17
to Node-RED
if you double click on the arduino-out node, what have you got selected as the options?

arnaud fontaine

unread,
Apr 2, 2017, 3:19:07 PM4/2/17
to Node-RED
Arduino
Type = Digital(0/1)
Pin = 13
Name = 

arnaud fontaine

unread,
Apr 2, 2017, 3:27:31 PM4/2/17
to Node-RED


Le dimanche 2 avril 2017 21:19:07 UTC+2, arnaud fontaine a écrit :
Arduino
Type = Digital(0/1)
Pin = 13
Name = 


I just use the example "Blink" defined on nodered.org :
[{"id":"d7663aaf.47194","type":"arduino-board","device":""},{"id":"dae8234f.2517e","type":"inject","name":"0.5s tick","topic":"","payload":"","payloadType":"date","repeat":"0.5","crontab":"","once":false,"x":150,"y":100,"z":"359a4b52.ca65b4","wires":[["56a6f8f2.a95908"]]},{"id":"2db61802.d249e8","type":"arduino out","name":"","pin":"13","state":"OUTPUT","arduino":"d7663aaf.47194","x":570.5,"y":100,"z":"359a4b52.ca65b4","wires":[]},{"id":"56a6f8f2.a95908","type":"function","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":100,"z":"359a4b52.ca65b4","wires":[["2db61802.d249e8"]]}] 

arnaud fontaine

unread,
Apr 2, 2017, 5:10:30 PM4/2/17
to Node-RED


Le dimanche 2 avril 2017 21:27:31 UTC+2, arnaud fontaine a écrit :


Le dimanche 2 avril 2017 21:19:07 UTC+2, arnaud fontaine a écrit :
Arduino
Type = Digital(0/1)
Pin = 13
Name = 


I just use the example "Blink" defined on nodered.org :
[{"id":"d7663aaf.47194","type":"arduino-board","device":""},{"id":"dae8234f.2517e","type":"inject","name":"0.5s tick","topic":"","payload":"","payloadType":"date","repeat":"0.5","crontab":"","once":false,"x":150,"y":100,"z":"359a4b52.ca65b4","wires":[["56a6f8f2.a95908"]]},{"id":"2db61802.d249e8","type":"arduino out","name":"","pin":"13","state":"OUTPUT","arduino":"d7663aaf.47194","x":570.5,"y":100,"z":"359a4b52.ca65b4","wires":[]},{"id":"56a6f8f2.a95908","type":"function","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":100,"z":"359a4b52.ca65b4","wires":[["2db61802.d249e8"]]}] 


I change "arduino" by /dev/ttyACM0 ... It's more fine !
:-)

arnaud fontaine

unread,
Apr 2, 2017, 5:11:57 PM4/2/17
to Node-RED


Le dimanche 2 avril 2017 23:10:30 UTC+2, arnaud fontaine a écrit :


Le dimanche 2 avril 2017 21:27:31 UTC+2, arnaud fontaine a écrit :


Le dimanche 2 avril 2017 21:19:07 UTC+2, arnaud fontaine a écrit :
Arduino
Type = Digital(0/1)
Pin = 13
Name = 


I just use the example "Blink" defined on nodered.org :
[{"id":"d7663aaf.47194","type":"arduino-board","device":""},{"id":"dae8234f.2517e","type":"inject","name":"0.5s tick","topic":"","payload":"","payloadType":"date","repeat":"0.5","crontab":"","once":false,"x":150,"y":100,"z":"359a4b52.ca65b4","wires":[["56a6f8f2.a95908"]]},{"id":"2db61802.d249e8","type":"arduino out","name":"","pin":"13","state":"OUTPUT","arduino":"d7663aaf.47194","x":570.5,"y":100,"z":"359a4b52.ca65b4","wires":[]},{"id":"56a6f8f2.a95908","type":"function","name":"Toggle output on input","func":"\n// If it does exist make it the inverse of what it was or else initialise it to false\n// (context variables persist between calls to the function)\ncontext.level = !context.level || false;\n\n// set the payload to the level and return\nmsg.payload = context.level;\nreturn msg;","outputs":1,"noerr":0,"x":358,"y":100,"z":"359a4b52.ca65b4","wires":[["2db61802.d249e8"]]}] 


I change "arduino" by /dev/ttyACM0 ... It's more fine !
:-)

The led flash now !
but I have always the same errors in debug panel 
Reply all
Reply to author
Forward
0 new messages