Pi+Pi+Pi+Pi+Pi+Pi = ???

Photo of Mellow_Labs

Made by Mellow_Labs

About the project

The Pi+Pi+Pi+Pi+Pi+Pi project is a personal challenge to communicate between 6 raspberry pis using different communication methods

Project info

Items used in this project

Hardware components

Raspberry Pi Pico Raspberry Pi Pico x 2
Raspberry Pi Zero Raspberry Pi Zero x 1
Raspberry Pi 3 Model B Raspberry Pi 3 Model B x 3

Software apps and online services

thonny thonny

Story

Are you someone who enjoys experimenting with new projects and discovering what's possible? If so, then you'll love the story I have to share with you!

Recently, I embarked on a wild challenge to see how many Raspberry Pis I could connect in a chain, and what kind of communication methods I could use to pass messages between them. This challenge soon became a personal mission to control three LEDs (red, blue, and green) at the end of the chain from a web-based terminal running on the first Raspberry Pi.

I made a video for this project if you prefer those:

Pi 1: The First Step

To start things off, I made the first Raspberry Pi host a webpage with a text field. Whatever text was put into that field would be saved to a two-way text file and displayed on a different page hosted on the same Pi.

Pi 2: The Web Scraper

Next up was the second Raspberry Pi. I programmed a web scraper to go to the display page of Raspberry Pi 1 and print out whatever was displayed. The message was then passed over to the third Raspberry Pi with a serial connection.

Pi 3: The Serial Connection

The third Raspberry Pi grabbed the message from the serial connection and sent it over a socket connection to the fourth Raspberry Pi. I tried a few different communication methods between these two Pis, but they weren't reliable enough, so I settled on using sockets.

Pi 4: The Reverse Method

I set up a web page on the fifth Pi (a Pico W), to which the fourth Raspberry Pi would go and put the message at the end of the URL. I realized this was like using a method I had used before, but backwards. But hey, this was my challenge, so I make the rules!

Pi 5: The Final Stretch

We were getting close! The final stretch was from Raspberry Pi Pico to Raspberry Pi Pico. For this, I decided on using a UART connection for the final hop.

Pi 6: Success!

And with a little bit of filtering, I was able to pass the message on to some logic that allowed me to turn the LEDs on and off individually depending on the message received. It was truly a remarkable accomplishment, and I couldn't be happier with the results.

Phew!

That was quite the journey, but it was totally worth it. I learned so much about different communication methods and the limitations of different hardware setups. And hey, who knows what kind of crazy project I'll come up with next?

If you enjoyed reading about my latest project and want to stay updated on my future endeavors and YouTube videos, then be sure to follow me on Patreon! Your support would mean the world to me, and it would allow me to continue exploring new ideas and pushing the boundaries of what's possible. Thanks for reading, and I hope to see you soon on Patreon!

Code

pi_pi_pi_pi_pi_pi

Credits

Photo of Mellow_Labs

Mellow_Labs

Hellow im Mellow

   

Leave your feedback...