Audio
Swap the Coloured Brick, Change the Song: This Little Player Has a Lovely Trick
A real handmade music player uses a colour sensor and physical bricks to choose audio. Here is the project and the interface idea behind it.

Swap the Coloured Brick, Change the Song: This Little Player Has a Lovely Trick
Pick up a blue brick, put it on the player and press the knob. Swap it for a yellow one and you can choose a different sound. No scrolling through a tiny playlist, no guessing which button does what: the object in your hand becomes part of the interface.
That’s the idea behind the Color Sensing Music Player, a 2026 project by the Ruiz Brothers and Liz Clark. They built a little 3D-printed boombox that reads the colour of a LEGO DUPLO brick and associates it with an audio file.
The images here show their actual device and assembly. We haven’t built or tested it ourselves. Let’s look at the design, the real parts involved, and the idea you can borrow for a playful project of your own.
The brick is the playlist

The creators’ player and colour choices. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
In the documented build, you place a brick in the sensing area and press the rotary knob to play the associated MP3. The knob also controls playback and volume. A light responds to the selected brick colour.
That press matters. The project isn’t described as automatically playing every time a brick comes near it. The physical brick chooses the colour; the knob is the deliberate “go” control.
The creators configured their example for eleven colours from their brick set. Their guide explains how to read sensor values and assign an audio file if you want to add other colours. Your own lighting, materials and code can affect recognition, so don’t assume every object of a vaguely similar colour will be recognised perfectly.
Why this is a good interface idea
There’s a very human reason this feels appealing: you can see the choices before you use them. A red brick might mean a drum loop, a green brick a nature sound and a blue one a short spoken message. Put the bricks in a row and the playlist becomes something you can handle.
Those examples are ideas for your own audio, not a claim about tracks supplied with the project. The point is the relationship between a physical choice and a digital result. You could apply it to a museum display, a sound-effects prop or a tabletop experiment.
It’s also worth thinking about accessibility. Colour alone won’t work for everyone. If you design an adapted version, consider adding distinct shapes, tactile marks or clear labels as well; don’t assume a colour-only system will suit every user.
Inside the friendly little case

The project’s printed enclosure parts. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
The creators use an RP2040 Prop-Maker Feather, a colour sensor, a rotary encoder, a speaker and an Adalogger FeatherWing with a microSD slot. CircuitPython code ties the input and audio together. The complete parts list and guide explain the documented hardware.
The case is designed around those parts. Before printing, check your machine’s build area and compare the specific components you can obtain with the guide. A different speaker or sensor board may need a different mount, even if its product name sounds close enough.
The guide calls this an intermediate build and includes soldering. It’s not simply a printed shell with a phone speaker hidden inside. Budget for the electronics, fasteners and wiring as well as filament.
The sensor has to see the choice

The colour sensor being fitted inside the enclosure. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
The placement of the sensor is a big part of the design. It needs a consistent view of the brick where a person naturally puts it. If the gap changes or light enters differently, the readings can change too.
That suggests a useful test order: verify the sensor and code as described in the source, try the actual objects you intend to use, and only then decide whether the enclosure needs adjustment. If two colours are frequently confused, inspect the reading and the lighting before assuming your speaker or file has failed.
Keep a note of which object is meant to trigger which file. When you’re changing code and swapping physical pieces at the same time, it’s surprisingly easy to forget whether the wrong sound is a sensor issue or a file-mapping issue.
Make the files easy to find

The open player during the creators’ assembly. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
The project stores audio on a microSD card. Follow the creators’ code and file instructions for names, paths and supported files. A tidy little folder of test sounds is more useful for a first run than a huge collection with names you can’t tell apart.
Try beginning with clearly different sounds that you have the right to use. A spoken word, a bell and a short drum hit make it easy to hear whether the selected file changed. Once that works, replace them with the clips you actually want.
If you plan to share a finished project or use it commercially, check rights for the audio separately. Owning a music player or finding a track online doesn’t automatically grant permission to redistribute the song.
A storage compartment is a smart detail

The creators built storage for the bricks into the case. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
The bricks live in a compartment on the device when they’re not in use. That turns out to be more than a cute extra. If the objects are the interface, losing them is a bit like losing the remote control.
This is the sort of finishing detail that separates an interesting prototype from a project people will happily keep using. Where do the pieces live? Can someone put them away without instructions? Does the storage compartment hold the actual number you intend to use?
For an adapted build, you might make a little row of labelled holders or a tray with differently shaped spaces. Test the idea in cardboard before spending hours printing a complicated organiser.
If it doesn’t play the expected sound
Work through the chain from input to output:
- Brick: Is the chosen object sitting where the sensor can read it?
- Control: Did you press the knob, as the documented project requires?
- Recognition: Does the sensor reading match a colour configured in the code?
- File: Is the associated audio file on the card with the expected name and location?
- Output: Is the speaker connected correctly and the volume turned up to a suitable level?
The source guide covers the actual wiring and software. This list is a way to reason about a problem, not a substitute for the creators’ setup instructions.
Make the experience your own

The finished colour-sensing player. Photograph by Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
I like the project because it makes a digital action physical. A tiny audio file is invisible. A bright brick waiting to be picked up is an invitation.
Read the original guide for its parts, code and assembly. Then have a think about the sounds you’d choose. I’d probably start with a collection of workshop noises and immediately regret putting the air compressor on the loudest setting.
Sources
Share this article
Know someone who would enjoy this? Pass it along.
