Problem Node-red-node-arduino and Arduino Nano

237 views
Skip to first unread message

Ulf Holt

unread,
Sep 24, 2017, 7:17:09 AM9/24/17
to Node-RED
I want to control a led stripe using PWM. This should be done from a Raspberry Pi, but it seems that PWM is not working very well if I use the RPi + a MOSFET to do the job. Problem is flickering - which seem to be a well know issue.
Next step was to use PWM on an Arduino Uno, wich worked like a dream. No flickering at all!
I still need to use the RPi as a front end since it's a part of a total solution, but I cannot make it work - that is, it looks like I cannot communicate using an USB-connection. I try to use the example I find at https://nodered.org/docs/hardware/arduino, but it looks like there is something missing somewhere. I get a strange error message when I fire up the RPi:"TypeError: Cannot read property 'board' of null"

Looks like there is something I'm missing. 


Ulf Holt

unread,
Sep 24, 2017, 8:00:31 AM9/24/17
to Node-RED
Just an update: I had not used /dev/ttyAMA0 as port in node-red. Done so now, but cannot connect and evry time I try to deploy, I'll loose connection with the server in Node-Red

Mark Setrem

unread,
Sep 24, 2017, 8:27:28 AM9/24/17
to Node-RED
it depends which version of the Raspberry Pi you have. The full instructions are listed here http://elinux.org/RPi_Serial_Connection

Ulf Holt

unread,
Sep 24, 2017, 9:11:28 AM9/24/17
to Node-RED
I'm a bit confused. Does this mean that I cannot use the USB - USB connection but have to use a USB - serial converter? The examples I have seen on Google shows USB both sides

Ulf Holt

unread,
Sep 24, 2017, 9:12:57 AM9/24/17
to Node-RED
By the way, I'm  using RPi 3B

Mark Setrem

unread,
Sep 24, 2017, 9:59:20 AM9/24/17
to Node-RED
as far as the raspberry pi is concerned you have a serial device it just happens to be using a usb cable

if the instructions you are following say to use
/dev/ttyAMA0
this has changed on the RPi3 because they decided to use that for the bluetooth connection. The page I linked to has the instructions (near the bottom) for what you need to change it to.

Ulf Holt

unread,
Sep 24, 2017, 10:42:40 AM9/24/17
to Node-RED
Thanks a lot, Mark, for taking time looking into this matter.

A read the information, but I cannot find any references to ttyAMA0 in any of the files, and there is no inittab file on the system. I'm running jessie-light, so everything is command line, though I doubt it matters.
I tried changing the port for the arduino node to point to /dev/ttyS0, but didn't help, and I get an error message Cannot read property 'on' of null for each of the 5 node - red entries under config in node-red. If I remove the entry in config, I do not get any error messages, and node red does not crash. /dev/ttyS0 is not recognized (port not found when node red starts)

Ulf Holt

unread,
Sep 24, 2017, 11:23:27 AM9/24/17
to Node-RED

Slow progress. Did enable SPI using raspi-config. This gave me a /dev/ttpS0, but I can still not connect, and I still get the same error messages when starting node-red, but it does not chrash now

Reply all
Reply to author
Forward
0 new messages