Given that the Raspberry Pi Pico and the RP2040 chip which powers it are meant to be microcontrollers, it’s amazing how much computing power developers have been able to squeeze out of them. The RP2040 chip, which runs at 133 MHz and comes with 256K of SRAM has been used for everything from a handheld game console (opens in new tab) to a web server and plant monitoring system. And, of course, you can play Doom on it.
Now, UK-based Developer Derek Woodroffe, who runs a site and Twitter account called Extreme Electronics (opens in new tab), has built a way to combine nine different Raspberry Pi Picos into a distributed computing cluster. On Twitter, he posted a video of the cluster performing a Mandelbrot calculation and outputting it as a fractal image to a 240 x 320 display (an ili9341) using an I2C connection.
9 picos , 1 display…Some issues with missing data still, I suspect a race condition details in the git. https://t.co/WZ7SRE3ibE pic.twitter.com/wocjRiXod1April 7, 2023
Woodroffe has posted his code and instructions for reproducing the project, which he calls PicoCray, on his github page (opens in new tab). He writes that, to pair the Picos together, you must connect GPIO 10, 11, 12, 13 and GND from one board to another. Each Pico must be powered on its own via USB or over the 3.3-volt pin. He also says that you will need to put 4.7K Ohm resistors on GPIO 10 and 11 on the last processor in the group.
The code is identical on all of the nodes in the cluster and, if you want to use one as the controller you must connect a wire from GPIO 22 to ground. There are more details on the github page.
Woodroffe notes that, at present, this is more of a proof of concept than a powerful, multi-processor system. He writes that “for many uses, it actually runs slower than running on a single Pico.” However, the idea is a solid one and we expect to see more developers take advantage of it.
To be fair, this isn’t the first instance of someone using multiple RP2040 chips together for more computing power. Recently, Pimoroni announced that is working on a new DV stick that will have one RP2040 for video and another for other tasks. And, when it comes to regular Raspberry Pi computers, there are a ton of cluster options. One mega cluster even contained 100 Pis (opens in new tab).