In this interactive Arduino project, we simulate a bouncing green ball on a full-color ST7789 170x320 LCD screen, controlled entirely by the motion of an MPU6050 gyroscope. As you tilt the sensor, the ball moves with realistic physics, including velocity, damping, bouncing, and spin effects.
This is a perfect mini-game or user interface element for embedded systems, handheld devices, or motion-based controls.
https://youtu.be/Tf6Kmzf3Rag
PCBWay offers high-quality PCB prototyping and assembly at an affordable price, starting at just $5 for 5 PCBs. With fast turnaround, great customer support, and easy online ordering, it's a top choice for hobbyists and professionals alike.
The project reads gyroscope data from the MPU6050 and uses it to move a virtual ball on the ST7789 display. The ball responds to tilt with acceleration and velocity, bounces off screen edges, and spins.
Key Features:
Realistic physics: damping, bouncing, velocity
Gyro-based control: intuitive movement with tilting
Efficient screen updates: erase old position, then draw new.
delay(16);
Aims for 60 FPS animation (1000ms / 60 ≈ 16.6ms per frame).
Conclusion
This project combines physics, sensor data, and graphics into a fun, responsive animation. Perfect for learning about real-time input-output systems, game loops, and embedded UI!
Discussion
Be the first to comment