Hi, I'm thinking about a way to connect different Arduino to RB, then process received datas by NR, maybe there is something ready?
There may be some options:
ethernet: this is the easiest way, shield with ethernet port and MQTT packets, it needs a switch/hub to get all cables together. To save the hub it's possible to use WiFi, but I would love to stay on wire transmission
UART, this has sense as the data sent are just some bytes, but there is only one UART interface.. so I may connect all together and polling each Arduino, only then they can send datas. Complicated to connect wires together, I need open collector outputs and one pullup resistor, is it possible to configure the TX Adruino output as open collector?
can be interesting to connect different GPIO pins to each Arduino, but how then import data? I suppose I need to rebuild a serial protocol for each GPIO input..
Hi, thanks for reply, can you please explain better it? I had a look but I haven't understand much, which hardware to communicate it uses? Also ethernet? What are the advantages compared to MQTT?
About serial.. the problem is to create a point (Raspberry) - multipoint (different Arduinos) connection, the bus should be shared, so only open collector ports can be connected, can Arduino TX pin be configured as open collector?
If your Arduinos are networked, either ethernet or wifi, MQTT is very simple. It does need a broker - Mosquitto - which can easily run on your Raspberry Pi.
After that, it just works. One machine publishes a message; it is delivered to any machine which has declared an interest (subscribed to the topic).
You don't need to know anything about TCP/IP, busses, ports, pins, number of connections etc.
Thanks guys, the Arduinos are not equipped with ethernet, but I can buy the interface for them, this looks easier than wire the serial connection and create a polling protocol, also, with IP, I can also ping and monitoring devices.
I'm not afraid of TCP/MQTT and all you mentioned, I know that stuff, I'm evaluating the easiest way.
I'm curious about Firmata, never heard about it, I would be glad someone answer my questions:
which hardware to communicate it uses? Also ethernet? What are the advantages compared to MQTT?
Before you purchase an Ethernet module for your Arduino, you might like to consider going down the ESP32-S2 Mini route. These units are inexpensive, have WiFi capability (so can support MQTT) and have loads of functionality. Here's a link to one supplier on Ali-Express.
Thank you for sharing, I haven't bought nothing by now, I can consider WiFi but as I have to power this modules by a battery stable power I can use a cat5e cable and use ethernet too, this will assure me more relyability than wifi.
I would use Arduino also because it assures me compatibility with wiegand libraries for example, to manage external keyboard.
Now I would know more about Firmata and what is involved with, or another possibility like RS485 if there are modules ready, thank you
Considerning the low quantity of bytes I need to transfer and the cheap cost of interfaces, plus avoid to buy an ethernet switch, I'm going to go for RS485 interface, NR will poll regulary each Arduino and waiting for response