# @marcodigispace on Instagram

- **Type:** Video
- **Original URL:** https://www.instagram.com/p/DcGhQemMJ0G
- **Gondola URL:** https://gondola.cc/posts/69422793-marcodigispace-instagram
- **Thumbnail:** https://img.gondola.cc/tr:w-,h-,fo-auto/postThumbnails/75684052f1.jpg
- **Posted:** 2026-08-16T13:00:51.000+00:00
- **Account Owner:** Marco Ciofalo (@marcodigispace) — https://gondola.cc/marcodigispace

## Caption

I built this. 🔵

320 tiny spheres, falling, colliding and piling up exactly the way real beads would — running on a chip smaller than a coin.

It’s an ESP32-S3 with a 2.06” AMOLED and a 6-axis IMU. The sensor reads the actual direction of gravity, so when I tilt the device the spheres don’t play a canned animation — they genuinely fall.

What I wrote:

→ Verlet integration for the motion, so the spheres carry real momentum instead of just sliding.
→ A spatial hash grid for the collisions. Checking every sphere against every other one would mean 50,000 tests per frame; splitting the screen into cells cuts it to a few hundred.
→ No UI framework. Every sphere is a sprite I generate at boot — directional lighting, specular highlight, blue rim glow — and blit by hand into a framebuffer. Graphics libraries choke well before you hit 300 objects.

I used Claude as my pair programmer: I described what I wanted, we argued about the bottlenecks, and it caught the mistake that was quietly halving my frame rate.

Hardware is fun again.

#ESP32 #EmbeddedSystems #CreativeCoding #PhysicsSimulation #MadeWithClaude

## Stats

- **Views:** 0
- **Likes:** 32
- **Shares:** 0
- **Comments:** 4

## Tags

madewithclaude, embeddedsystems, creativecoding, physicssimulation, esp32

---
Copyright (c) Gondola