# Dotstar + CircuitPython Digital Sand

## Overview

Something that has gotten popular recently is [Phil Burgess' _digital sand_ demo](../../../../animated-led-sand).&nbsp; It's been riffed on a few times now, and since I have been playing around with the Dotstar Featherwing, I thought I'd have a go at it as well.

I really wanted to do this in CircuitPython, partly as a learning exercise since I'm still fairly new to (Circuit)Python, and partly to see how far it could be pushed on a rather constrained environment like the SAMD21G18.

The code is a fairly literal port of Phil's code as listed in the Ruiz Brothers' [Animated LED Sand](../../../../animated-led-sand) learning guide. I did have to make some changes, and do some optimization to get it all to fit and to run at a reasonable speed. I'm pretty happy with how it turned out. I'll go over those optimization on the code page.

See the GIF below to see a short demo - its slower than C code, maybe better-called _LED Snow_ than sand?

![](https://cdn-learn.adafruit.com/assets/assets/000/050/330/medium800thumb/sensors_sand_demo.jpg?1516559394)

- [Next Page](https://learn.adafruit.com/digital-sand-dotstar-circuitpython-edition/an-lsm303-featherwing.md)

## Guide Products

### Short Headers Kit for Feather - 12-pin + 16-pin Female Headers

[Short Headers Kit for Feather - 12-pin + 16-pin Female Headers](https://www.adafruit.com/product/2940)
These two&nbsp; **Short** &nbsp; **Female&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with any of our&nbsp;[Feather](https://www.adafruit.com/categories/777)&nbsp;boards and you're in business!

These headers are particularly cute and...

In Stock
[Buy Now](https://www.adafruit.com/product/2940)
[Related Guides to the Product](https://learn.adafruit.com/products/2940/guides)
### Short Feather Male Headers - 12-pin and 16-pin Male Header Set

[Short Feather Male Headers - 12-pin and 16-pin Male Header Set](https://www.adafruit.com/product/3002)
These two&nbsp; **Short** &nbsp; **Male&nbsp;Headers** &nbsp;alone are, well, lonely. But pair them with any of our&nbsp;[Feather](https://www.adafruit.com/categories/777)&nbsp;boards and you're in business!

<p...></p...>In Stock
[Buy Now](https://www.adafruit.com/product/3002)
[Related Guides to the Product](https://learn.adafruit.com/products/3002/guides)

## Related Guides

- [NeoPixel Remote: IR Control with WLED](https://learn.adafruit.com/neopixel-remote-ir-control-with-wled.md)
- [Arcade Machine/Console Emulator for ESP32 Handheld](https://learn.adafruit.com/handheld-esp32-arcade-machine-ports.md)
- [Pip-Boy 2040 Wrist-Mounted Prop](https://learn.adafruit.com/pip-boy-2040.md)
- [reef-pi Guide 2: Power Controller](https://learn.adafruit.com/reef-pi-power-controller.md)
- [reef-pi Guide 6: pH Monitoring](https://learn.adafruit.com/reef-pi-guide-7-ph-monitoring.md)
- [MUNNY Glowing Friend with Bluetooth Control!](https://learn.adafruit.com/munny-lamp.md)
- [BLE Synth with the Feather nRF52840 and Circuit Playground Bluefruit](https://learn.adafruit.com/ble-synth-with-the-feather-nrf52840-and-circuit-playground-bluefruit.md)
- [Animatronic Cosplay Wings](https://learn.adafruit.com/animatronic-cosplay-wings.md)
- [DIY Darksaber Build - 3D Print with PropMaker FeatherWing and BLE](https://learn.adafruit.com/ble-darksaber-propmaker.md)
- [I Vote(d) Pin](https://learn.adafruit.com/i-vote-d-pin.md)
- [RGB Matrix Slot Machine](https://learn.adafruit.com/rgb-matrix-slot-machine.md)
- [Wireless NeoPixel Controller](https://learn.adafruit.com/neotrellis-neopixel-controller.md)
- [CircuitPython OLED Watch Clock](https://learn.adafruit.com/circuitpython-oled-watch.md)
- [MP3 Feather - Gordon Cole](https://learn.adafruit.com/mp3-feather-gordon-cole.md)
- [Minecraft GPS Compass](https://learn.adafruit.com/minecraft-gps-compass.md)
