Node-red communicating with Arduino using MQTT and NO Wifi?

Can someone help direct me to an example of how I can communicate with my Arduino Nano, which is directly connected to RPi running Mosquitto Broker and NR without wifi? I'm looking to elminate the reliance on wifi and prefer to go hard wired solution and want to control relays on the Arduino.

Thank you!

You will need to reprogram your Arduino - you can talk serial to the serialport node(s).
Or you could use the firmata firmware and then use the arduino nodes to control the IO directly (again over serial - but now relying on the Firmata protocol rather than your own application.)

How the payload of the MQTT message is formatted? Very often, it is JSON.

If so, you could use the serial port directly with JSON messages without MQTT.

1 Like