1

I want to build a device with both a small screen and 4 digit display. I have been having trouble getting the 4 digit display to work with my model B+, but it works with the my model A, you can find more detail about my issues in this question. I'm still working on that, I'm just slow.

Anyway it occurred to me that my case can hold two pis, I could use the model A to run the display and the model B+ to run the screen. To get more out of this I could attach a camera board to each to build a 3D surveillance system. Now I could run the two systems indepedently by putting a wifi dongle in each, but I also thought I could wire the two machines together through GPIO and pass data back and forth. At a minimum I'd need to get the time from the model B+, which would get the time from the internet, then pass it to the model A to run the 4 digit display. At most, I'd like to pass the still images or data from the model A to the model B+ for access through the internet.

What protocols (if any) exist for Pi to Pi communication through GPIO? What kind of transfer speeds should I expect? Am I better off with 2 independent machines in 1 box?

On a side note I built a switch that lets me hook 2 Pis to a single screen, then toggle which one gets displayed. Might be helpful in this situation where I can see what each Pi is up to instead of only being able to see the model B+.

3
  • I really would reconsider the wireless or ethernet option (if you have to pull wires between the GPIO ports, you might as well pull an Ethernet cable and connect them to a small switch). No need to invent, test and debug your own protocols and software etc. Oct 11, 2014 at 6:15
  • 2
    No ethernet on the model A.
    – user137
    Oct 11, 2014 at 6:29
  • See the comments below. UART and SPI are probably your best way forwards. Ethernet will be easier, as you'll not have to build everything yourself, like you will with UART, as you'll probably want to figure out how to get a serial terminal device working, so you use some of the higher level functions from the OSI stack, which you'll otherwise have to code yourself. I guess if you're low on power, it'd make sense not to use a USB ethernet device, but it's debatable.
    – sibaz
    Jan 15, 2016 at 9:33

2 Answers 2

3

You can also use the UART on both units, just make sure you connect Tx on one with Rx on the other. Should get you at least 112000 kbps, and it is standard supported in both Raspbian (e.g. via the screen utility) as well as in programming languages. GPIO14 is Tx, GPIO15 is Rx.

1
1

The SPI can work in excess of 48MHz. Best to keep the wires very short at those speeds unless you really know what you're doing.

I'm not sure how fast you can run it from user mode though

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.