Tilt Catch
Play a browser catch game steered by tilting the board — no buttons. The onboard RGB LED flashes as light feedback for catches, misses, and game over.
There are no buttons on this controller. The Nano’s accelerometer is the joystick: tilt left/right and the sketch streams acceleration over BLE notifications (~25 Hz). The browser maps the X axis onto a paddle at the bottom of a catch game.
When you catch a teal orb, miss one, or lose your last life, the game writes a one-byte feedback code to the board. The sketch turns that into a short, non-blocking RGB + built-in LED pulse — green for catch, red for miss, red/blue strobe for game over — so the board “buzzes” with light even though there is no vibration motor.
That closes a two-way loop: sensor data flows Arduino → browser for control, and game events flow browser → Arduino for feedback. Flash this sketch, connect as Nano33-Game, press Play, and tilt the board flat while you play.
Goals
- Stream accelerometer samples to steer an on-screen paddle
- Write short LED feedback events from the game back to the board
- Build a two-way BLE controller loop with no external buttons
Materials
- Arduino Nano 33 BLE Sense (onboard LSM9DS1 + RGB LED)
- USB cable
- Arduino IDE with ArduinoBLE and Arduino_LSM9DS1