Richard avatar image
Richard asked

Node red serial comms issue Arduino - RPI

Hello All,

Hopefully this is the right place for this question...

I have a RPI set up with Venus os large installed. I want to be able to send some messages back and forth over serial to an Arduino Uno (mostly to tell the Arduino my water tank level for a side project). for my testing I have set the Arduino up to send a string over serial every 2.5secs however on the node-red debug I only receive some of the messages and most of them are very messy (see image). both baud rates are set up correct and to my knowledge the ports are set up right. screenshot-2024-06-22-at-232146.png

the string the uno is sending is "Data: " with a random number afterwards.

Thank you in advance.


Raspberry PiNode-REDarduinoserial
1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

kevgermany avatar image kevgermany ♦♦ commented ·

Moved to modifications area as it's a Pi/Node-Red question.

1 Like 1 ·
1 Answer
Richard avatar image
Richard answered ·

For anyone in my situation in the future I have found the answer through what seemed like a lot of scouring the back end of google! And some help from someone over in the node-red forum here.

TLDR - This happens as VenusOS tells the RPI that the USB may only be one of a handful (4 maybe?) of types - It also uses the serial ports as a console interface. If you are using the Arduino via USB, the port you are looking for may not be ttyUSB0. It may be ttyAMA0 as mine was. Remove 'console=ttyAMA0,115200' from cmdline.txt found in the boot folder. Then follow this guide (specifically the part about 'How to stop serial-starter on a tty port') to stop VenusOS from blocking the USB. If that works then the next part about 'How to make serial-starter ignore different USB types' is what you want to do to make the Arduino work on any USB port.

In my case in the end I wanted to use the serial GPIO pins which required me to add the line from 'serial-starter on a tty Port' into the cmdline.txt file located in the boot folder of venusOS. This seems to run every time on startup and now works as it should.

Will update the post if I run into any issues!


2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.