
Raspberry Pi LED Matrix Sand Toy
Created by Ruiz Brothers
Last updated on 2021-03-25 12:47:35 PM EDT

2
3
3
4
6
7
7
7
8
8
8
8
8
9
9
10
11
11
12
12
12
12
12
13
13
13
13
14
14
14
15
15
16
16
17
17
17
17
Guide Contents
Guide Contents
Overview
Simulated LED Sand Physics!
Prerequisite Guides
Circuit Diagram
Code
Install Matrix Driver
Install Git and Clone
Enable I2C via raspi-config
Make PixelDust
Running the Code
Adjusting Brightness
Automatic Startup
Safely Shutdown setup
Customization Options
3D Printing
Slice Settings
Mirror
Assemble
Prep Bonnet
Jumper
Bridge Pad
Solder LIS3DH
PowerBoost
Slide Switch
DC Plug
Board Frame
Matrix Cables
Matrix Handles
Attach boards frame
Battery frame
Mount Battery frame
Buttons
Mount buttons
Solder Buttons
Ground
Thread Button wires
Connect Battery
© Adafruit Industries https://learn.adafruit.com/matrix-led-sand Page 2 of 19

Overview
Simulated LED Sand Physics!
These LEDs interact with motion and looks like they’re affect by gravity. An Adafruit LED matrix displays
the LEDs as little grains of sand which are driven by sampling an accelerometer with Raspberry Pi Zero!
The 3D Printed handles make it easy to hold the 64x64 LED Matrix and the two buttons make it easy to
switch modes or reset simulations!
The code, written by Phillip Burgess (https://adafru.it/iPc), simulates physics by calculating collisions and
terminal velocity.
© Adafruit Industries https://learn.adafruit.com/matrix-led-sand Page 3 of 19

Prerequisite Guides
I suggest walking through the following guides to get a better
understanding of the electronics.
Adafruit LIS3DH Triple-Axis
Accelerometer (https://adafru.it/AJo)
RGB Matrix Bonnet for RaspberryPi (https://adafru.it/AJp)
14 x M2.5x5mm Screws
M2.5x5mm Screws
4 x M3x5mm Screws
M3x5mm Screws
WARNING - The hole spacing on the 64x64 2.5mm pitch matrix (PID 3649) has changed. Currently,
the 3D parts DO NOT match this new spacing.
Your browser does not support the video tag.
64x64 RGB LED Matrix - 2.5mm Pitch
© Adafruit Industries https://learn.adafruit.com/matrix-led-sand Page 4 of 19

Winter time can be rough in the city. The sky is gray. The weather is unpredictable. So slough off those
seasonal blues with some Times Square razzle dazzle from this...
$54.95
In Stock
Adafruit RGB Matrix Bonnet for Raspberry Pi
You can now create a dazzling display with your Raspberry Pi with the Adafruit RGB Matrix Bonnet. These
boards plug into your Pi and makes it super...
Out of Stock
Add to Cart
Out of
Stock
© Adafruit Industries https://learn.adafruit.com/matrix-led-sand Page 5 of 19

Circuit Diagram
Take a moment to review the components in the circuit diagram. This illustration is meant for referencing
wired connections - The length of wire, position and size of components are not exact.
The Slide switch will connect to the PowerBoost1000C board on the GND and the EN pin
PowerBoost 5v and G connects to the Bonnet via the 2.1mm Male DC adapter and will both need to be
150mm long.
RGB Matrix Bonnet connects to the Raspberry Pi Zero.
LIS3DH connects to the Bonnet and will need to be 80mm long for 3V, GND, SDA and SCL connections.
The Reset Button connects to pin 19 and will need to be 110mm long. Ground will need to be 95mm long.
Mode Button connects to pin 25 on the Bonnet and will need to be 130mm long. Ground will need to be
160mm long.
© Adafruit Industries https://learn.adafruit.com/matrix-led-sand Page 6 of 19