Hello,jsobota wrote:Unless you use additional hardware, the Arduino and Raspberry Pi must be relatively close to each other (you can connect them via USB or I2C).
The decentralized system can be built, one RPi will serve as a "master" with a webser running and the other RPis will be "slaves" who will exchange data with the "master".
But this decision should be made AFTER you know exactly what functionality you expect from your system.
I think a separate RPi for each room would be an overkill. I would go for a RPi+Arduino for each individual floor or something like that.
Hello, I don't understand.jsobota wrote:SPI is meant for communication between various devices over short distances, it is used mostly on a single PCB.
For communication between 2 or more RPis, I would use the onboard Ethernet.
Hello jsobota,jsobota wrote:You understand it correctly, I meant connecting the RPis via home router (or switch).
The use of Arduinos is always possible. But you did not mention any analog signals in your initial post so we are coming back to my first reply - think about all the measured signals and controlled devices first, THEN search the hardware which will allow you to do what you need.
Ok I'm understanding. For RPi2 you mean a RPi slave displaced in a room, that can be an Arduino also? Or what?jsobota wrote:OK, to clarify things: I2C and SPI are meant for master/slave connection, no discussion about it.
What I meant with "master" and "slave" in the webserver context was that the RPi1 running the webserver can not only display all the data it reads from its own SPI or I2C slaves but it can also poll data from RPi2 over the Ethernet. The RPi2 has its own I2C slaves or maybe an Arduino connected via USB.
Because RPi1 polls data from RPi2, it is possible to display all the data in one webpage, which is available from RPi1.
AFAIK, the I2C and SPI buses are used mainly for short-range communication. On the contrary, the Ethernet cable can be up to 100 metres long.
I have experience only with RPi+Arduino. For connecting these two together, I have developed "REXduino", see it in action:I will study it. So with this schema I can command the RP2 and Arduino+Eth_Shield via webserver (that is on RP1), right?
What I should understand is how the RPi2 and Arduino+Eth_Shield can respond to the webserver of RPi1. Is there a database where the RPi and Arduino will insert their datas? Do you have some tutorial on how to do this?