IMU Sandbox

A tilt-controlled STM32 sandbox running up to 3,000 sand particles at approximately 30 FPS from BNO055 orientation data.

Tilt the board to shift gravity. Try different materials, planets, and effects.

Current modeNormal
Base gravity Down Earth · 1.00g
Mode
Gravity magnitude
Controls
↑↓Pitch←→YawQRoll CCWERoll CWSpaceChange mode

Arrow keys change pitch and yaw. Q and E change roll. Space changes mode.

Loading OLED simulation...

Rotation

Web version built with JavaScript and Three.js.

Inside the sandbox

3,000
sand particles
≈30 FPS
simulation rate
1 KB
occupancy grid
0.16g–2.5g
gravity range

An STM32F446ZE reads BNO055 tilt data and drives two 128 × 64 OLEDs: one for particles, one for settings. The sandbox supports sand and rock, four effect modes, and three planetary gravity presets.

Contribution

I built the Q8 fixed-point particle engine, 1 KB occupancy grid, and optimized collisions. I also implemented rock, Wind, Shake, and Explosion behavior, tuned the hardware, and helped with the 3D-printed assembly.

Performance and next iteration

Blocking 1,024-byte OLED transfers on the shared 400 kHz I²C bus limit performance. SPI, partial redraws, DMA, and separate physics and display rates are the next improvements.

View original source