Arduino Uno to Groov Rio

I am trying to do a very basic test, which is reading temperature and humidity on Arduino Nano from node red of the groov rio device, I do not know how to connect the arduino to groov Rio, I tried connecting the arduino directly to the USB port and download the node red serial nodes on node red but it gives me an error, I know two other ways would be using an ethernet shield (which i already have) to my arduino and the second way is using one of RS-xxx communication but i do not have it and need to set it up with in house components.

Welcome to the forums Mazen.

Depends on your end goal (@torchard and I are big believers in the phrase ‘begin with the end in mind’).

If you want to use the Arduino IDE via its USB, then you will need to use one of its ports in serial mode (often called a UART).
It also depends on whether you need bidirectional communications; if so, you will need both RX and TX lines. (Note, as you found, you cant just connect the two USB ports together. To use any sort of serial will require an FTDI USB to serial adaptor for the RIO and matching serial on the Arduino (if you want to use serial, please take a moment to read my blog about serial port options here: RS-232 and Level Converters )

It also depends on if in the deployed environment there is any networking, e.g., wifi or Ethernet, or both.

Since you have an Ethernet shield another option would be to use MQTT libraries on the Arduino and publish the temp and humidity to the broker and then the RIO can subscribe to them as needed.

Did you read this page?

Thank youu! I chose the UDP method, the code for arduino is a little bit easier than the MQTT for me, The Groov Rio is connected to a switch using ethernet cable to connect the groov rio to my local network, but for connecting the ethernet shield (Arduino), should it be connected to the groov rio or to the switch in order to be able to use the UDP in node using node-red

I would reccommend connecting the arduino to the switch so it gets its own IP from your router for you to use with UDP.

1 Like

@mabdalla Once you have an IP address in the Arduino, you can start testing the UDP by using a UDP node in Node-RED.
A suggestion is to send the temperature and humidity out of the UDP connection from the Arduino once a second. Then using a UDP in node, you should see it show up in the Node-RED debug tab on the right.

Be sure to pick a port number higher than 1024. Something random, up around the 9000’s would be great. That should be well clear of other used ports.
Don’t forget to open the firewall on the RIO to match that port number.