The world of DIY electronics is full of interesting ways for hardware and software to interact.
Microcontrollers such as the Arduino and single board computers such as the Raspberry Pi have completely changed the approach to electronics and hobbyist prototyping. Both of them are so suitable for rapid development that it can be difficult to decide which one to use in a project.
Now enter Processing and its new accomplice p5.js.
Both of these languages are designed to make coding more accessible to artists, educators, and beginners. If you have used the Arduino IDE, you may find the layout familiar. In fact, the Arduino IDE was based on the source code for processing. They have something in common: scripts are called thumbnails, and libraries can be installed from the IDE window in a similar way.
Today we are going to show you some of the coolest hardware projects using Processing and p5.js.
1. DIY music controller production

AKAI MPC is one of the main instruments of hip hop history. No wonder producer Mr. Bomb decided to emulate one of them at a hip-hop music hackathon in New York last year.
This build uses p5.js as the music processor and the Funkey board as hardware I/O. Funkey is an Arduino compatible board that also works with Scratch, perfect for teaching kids how to code.
Since the signals from the Funkey board are processed by p5.js, this eliminates the need for midi — although using the Arduino as a Midi device is easier than you might think.
In this case, the p5.js framework is used much like the real MPC’s sample banks, calling different samples depending on which hit it hit. The completely self-contained aspect of it really appeals to us. Instead of using buttons or switches, Mr Bomb uses copper tape and tin foil to create capacitive touch sensors.
The total cost of the entire assembly, which is about $20 for the Funkey Simple board and components, is a great alternative to an expensive controller.
2. Singing blues p5.js

From hip hop to blues now with an Arduino Uno controlled solo browser window.
This pentatonic solo slider is another invention of Mr. Bomb. This time the values are taken from the slider potentiometer and then mapped to notes in the pentatonic scale. All this was made possible thanks to the p5bots library, which connects to Arduino-compatible boards in Firmata mode. In our tutorial, we used a similar method to control Arduino with Javascript. control Arduino with control Arduino with
The p5.js sound libraries take care of sound generation. Given that p5.js runs natively in the browser, this makes it a powerful tool for recording, playing, and synthesizing audio.
3 Flying Plumber
This project from Vimeo user Ji Young Chun combines a homemade Arduino game controller with a game built in p5.js to make one of the slickest looking browser games of all time.
There is no further documentation for this project, but it uses all the basic states needed to make a simple browser game with the framework. The real ingenuity comes when it comes to character control. Instead of using the standard input methods, they instead use values from homemade bend sensors attached to the Arduino pins, which makes the game hero move erratically.
It’s a deep and interesting approach to making a Mario-like game, and certainly more difficult than creating levels for a real game. !
4. Pi AR with processing
