We wanted to do something with a network of Raspberry Pi's linked together. We wanted to see how we could use the GPIO pins to potentially make a low-latency network between the Raspberry Pi's. Afterwards, we came to the idea that we could make these Raspberry Pi's play telephone with each other, and the final idea was born.
What it does
This Python code runs on Raspberry Pi's and allows their GPIO pins to act as a token-ring based local area network. The network is low-latency, but also low bandwidth. This is good for security reasons, as well as potentially for networking them as microcontrollers for a larger machine or for industrial automation.
How we built it
The project used three Raspberry Pi's, a breadboard, and a ton of wire. After everything was hooked up and plugged into power, the software is put anywhere on the Raspberry Pi's hard drives, and once it's run the network is up and running. Then it just takes a user entering "start" into one of the programs to watch the magic happen.
Copy LazySusan.py somewhere on the raspberry pi.
Use pip or easy_install to install the numpy and bitstream packages.
Run each instance of LazySusan.py on seperate Raspberry Pi's, hooked together with whichever GPIO pins you prefer, the list of the ones we used is right near the top of the program.
Each instance is run via a command like "sudo python LazySusan.py ". The "sudo" is important, and all of the instances should be run with unique integers (they act as Node IDs)
Challenges we ran into
The Raspberry Pi is not quite that great at being a microcontroller. Synchronizing them together for direct communication is quite difficult, and without being extremely careful, the electrical components are noisy. This makes telling whether you are reading hi's or low's on the pins hard.
I, as well as the rest of the team, did not know a lick of Python before this project. So that was fun.
Accomplishments that we're proud of
I think I speak for the whole team when I say that we did a great job working together to create something fun. We had to overcome hardware and software obstacles, and by banding together and playing to our respective strengths I think we accomplished a ton in 24 hours.
What we learned
The whole team learned a ton of Python and a great amount about how the Raspberry Pi works. We also experimented with using Wolfram Alpha's API and using distributed computing to determine average floating point error on large multiply and divide operations.
What's next for Lazy Suzan Communications
Potentially Hack Duke! Sam has expressed interest in continuing work on it in the future, and I (Christian) also plan on doing some work with it as well. With more wires and pins it could have dramatically increased bandwidth.