Tools
Tip This Glowing Cube and the Pixels Fall Like Sand
A 24,576-pixel cube turns motion into a digital snow globe. Here is how its six faces, sensor and clever pixel mapping make the illusion work.

It's a box covered in tiny lights. Turn it over and colourful dots appear to tumble across its faces, piling up around a bright little star. Give it another tilt and the whole thing starts moving again.
The satisfying bit: there is no sand inside. The grains are pixels, and the thing making them behave is a combination of a motion sensor, software and six LED panels. It's an absurdly good example of a digital image doing something that feels physical.
The RGB matrix cube was documented by the Ruiz Brothers and Phillip Burgess in 2022, with further updates in the guide. Their larger 64 × 64-pixel faces contain 24,576 LED pixels in total: six times 4,096. That's the nearly 25,000 in the project title, not 25,000 separate individual addressable colour channels.
The photographs here show the makers' real project. We haven't built or tested the hardware ourselves, so think of this as a close look at a clever piece of creative technology rather than a claim that every instruction has been reproduced in our workshop.
Watch the impossible snow globe first

The maker's PixelDust demonstration, shown tilted. Still: Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
Watch the makers' cube demonstration. A still image is useful for seeing the panels, but the motion is the whole point here. The falling dots make sense as you rotate the object: they appear to collect on whichever side is lowest.
The example is called 3D PixelDust. Its accelerometer senses the cube's orientation, and the program uses that information to change how simulated grains move. The LED panels then show the result. The grains aren't real objects rattling around inside, and the project doesn't pretend to be a physically perfect simulation. It just gives your eyes enough information to buy the illusion.
That's a useful creative trick. The display responds to something you do, so it stops feeling like a looping screensaver and starts feeling like an object you can play with.
Six flat screens become one object

Four of the maker's matrix panels joined during the larger cube assembly. Photo: Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
Each face is a square LED matrix. The makers use 3D-printed brackets and magnets to bring the panels together and provide access to the electronics inside. The guide covers two physical cube sizes, so check the exact panel pitch and matching frame files instead of assuming every square display will fit the same parts.
The really interesting problem arrives at the edges. On a flat image, the right side of a row is just the right side of the row. On a cube, that edge meets another face, which may be physically turned relative to the first one. A dot moving across the seam has to arrive at the correct position and direction or the illusion falls apart.
The makers explain that the Raspberry Pi's matrix-driving library sees the larger setup as one long 384 × 64-pixel image. Their program then deals with how those panels fold and turn into a cube. There isn't a universal arrangement that magically works for every wiring layout; the mapping depends on how this particular object is assembled.
That's the bit I love. Making an image move is one problem. Making it move believably across six physical surfaces is an entirely different rabbit hole.
The tiny part that notices the tilt

The LIS3DH accelerometer and its mounting parts in the makers' build. Photo: Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
An accelerometer measures acceleration along its axes. In this project it gives the software information it uses to decide which way the virtual grains should move as the cube is tipped.
The guide notes that this sensor is optional if you only want to run the other included globe and Game of Life programs. It's needed for the interactive sand effect. It also warns that getting the sensor orientation wrong can make the motion behave incorrectly, so the physical mounting direction matters just as much as the code.
That distinction is useful for any interactive build: a sensor doesn't know what you mean by “up”. Your software has to interpret its measurements in relation to the way the hardware is mounted.
The gorgeous outside hides a lot of practical work

An open panel reveals the wiring inside the smaller cube build. Photo: Ruiz Brothers / Adafruit, CC BY-SA 3.0; resized.
A Raspberry Pi 4, matrix driver, cables, power distribution and printed mounting pieces all need to fit inside the enclosure. The guide calls the project advanced and points out that the parts are expensive enough for a wiring or power mistake to hurt. Some listed hardware was out of stock when we checked, and availability can change.
There is also the physical reality of handling it. The original guide discusses protecting the panel edges and shows a later acrylic enclosure. Follow the maker's current instructions and the component specifications if you choose to build one; don't improvise power wiring from a photo or assume any battery pack is suitable.
We haven't independently assembled the cube, checked current software compatibility or measured its battery life. Those details deserve a proper hardware test, not a confident guess from a distance.
What a maker can borrow without building all six faces
You don't need to make a 24,576-pixel cube to enjoy the idea. Start by choosing a small visual behaviour: a handful of dots falling, a pattern that changes direction, or a single shape that reacts to movement. Sketch what should happen when the object is level, tilted left and tilted right.
Next, make the rules deliberately simple. Does each dot move once per update? What happens when it reaches an edge? Can two dots occupy the same spot? Writing those decisions down first will tell you more about the interaction than immediately shopping for six displays.
If you already have a compatible matrix and controller, the makers' full project guide is a useful place to study the real components and software. A single-panel experiment can explore a similar idea, but it won't reproduce the cube's cross-face mapping or prove the full build works.
For a completely no-hardware exercise, draw four frames of a dot gathering in a corner, then rearrange them as if your paper screen has been rotated. It's not a replacement for the sensor; it's a quick way to plan the visual response before investing in electronics.
The lesson is bigger than an impressively shiny box. A clear physical action, a simple rule and an image that responds in the right direction can make a handful of pixels feel surprisingly alive.
Sources
Share this article
Know someone who would enjoy this? Pass it along.
