I’m planning a project where a RPI zero will be controlling a flying vehicle. It’s going to have 2 (maybe 3) cameras as an input. These will be connected over USB. I’m aware that processing the information from the cameras will require a lot of work, so the plan is to couple a second RPI zero to the first one, which will read the cameras and do some image preprocessing before feeding the information into the flight controlling RPI. This will lower the load on the first PI, and will make it much easier and safer to handle potential problems on the camera side of the system.
I know there are lots of ways to chain computers together, but a local network seems like the best plan for my case. Everything however has to be compact, so the two RPIs will simply be stacked on top of each other.
I’ve done some experiments with 2 Zero-W’s, where one is hosting a wifi network and the other one connects to it. The whole system works great this way. This of course isn’t ideal, so I’d like to replace this with a wired connection without having to change up the code completely.
I’m pretty sure this is possible, but I’m not really an expert in this matter. How should I set up this system so a local network exists where each RPI has an IP to connect to the other one, while connecting them over their GPIOs?
EDIT I could just use a pi with more power. There are however a few reasons why I don’t. 1: the zeros are cheaper, I have a bunch of them laying around, and their dimensions fit the project better. 2: The vehicle I’m talking about is and will be a platform for experiments. For its core business (flight) it will need 2 zeros (well 1 really, the cameras aren’t flight-critical, but the project is just pretty useless without them) but all sorts of experimental systems will be added in the future. Stepping up from 2 zeros to 10 zeros with a local network doesn’t seem to difficult. If I however use 1 board for everything, this will get complicated quickly. 3: It seems like a good idea to have flight-critical systems on a seperate board.
I know I could use other protocols like UART, I2C etc. but a local network just makes everything much easier and as far as I know much more data can be transferred, keeping the project open for expansion/experimentation. As I said, wifi works perfect. I don’t want to lower the baud rates and make everything difficult. It’s just that wifi seems silly and inefficient as a communication line between boards sepperated about 8mm apart where a physical connection is perfectly possible.