data from arduino mega serial mess up when node-red running

43 views
Skip to first unread message

Giovanni Guliano

unread,
Sep 13, 2017, 12:43:48 AM9/13/17
to Node-RED


hello, i wanna ask something.

i'm using arduino mega on my project (using temperature sensor and light sensor) then data from arduino stored to sql database in raspberry pi 3. which make me confuse is why serial output from arduino mess up when node-red is running..

in picture (serial terminal on arduino IDE) when node-red off, serial output is normal (39.5 | 27.8 | 17 | 3862). but when node-red on, serial output become random (13446933, etc)

why is that? 

node-red running on raspberry pi 3

Colin Law

unread,
Sep 13, 2017, 2:19:40 AM9/13/17
to node...@googlegroups.com
Is the Arduino serial port connected to pi? If so then have you got a serial node in your flow?

If not connected via serial port how is it connected to pi?

Colin

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/26e46b02-8003-409c-b126-7963232fb0fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Giovanni Guliano

unread,
Sep 13, 2017, 2:55:25 AM9/13/17
to Node-RED

yes, my arduino mega connected to pi with serial-usb cable.
 


i got serial node in my flow. 

 and this my configuration for serial node 



i already test that flow with arduino uno with some temperature sensor and the output is normal (output tested on rednode debug window and arduino IDE terminal window). not mess up like when im using arduino mega.
so what's wrong then? is my pi got bad configuration?

sorry for bad english

wku...@gmail.com

unread,
Sep 13, 2017, 1:59:30 PM9/13/17
to Node-RED
It looks like you are dropping characters, probably because a buffer overflows.

I'm not familiar with arduino models, but if the Uno is slower" than the Mega, the Mega might be overflowing the node-red UART buffers before all the data is read.

Can you add CTS/RTS handshaking or X-ON/X-OFF software handshaking?  Although my limited look with the node-red serial in node doesn't seem to offer any handshaking options.

Dave C-J

unread,
Sep 13, 2017, 2:20:54 PM9/13/17
to node...@googlegroups.com
I assume you aren't running the IDE at the same time as they won't share the serial port nicely ?

Giovanni Guliano

unread,
Sep 14, 2017, 12:13:35 AM9/14/17
to Node-RED
finally found some fix..

just like dave said im running the IDE and nodered at the same time in my raspi 3.. when IDE closed, debug window in rednode show normal output data..

thank you guys...
Reply all
Reply to author
Forward
0 new messages