In this interactive Arduino project, we simulate a bouncing green ball on a full-color ST7789 170×320 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.
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!
You May Also Like
Awakening each day early in the morning is a challenge for some. Therefore, utilizing a Smart morning timer or alarm can enable us to rise—and sparkle somewhat more uncomplicated and more accessible. Meanwhile, smart morning ... Read moreRead more
Introduction To measure the physical pressure or weight, the gaming devices, electronic drums, and smartphones use this sensor named, the Force sensing resistor. The sensor is more economical in price and reliable to use. Moreover, ... Read moreRead more
Overview In the world of IoT (Internet of Things), the ability to gather data from the environment and display it in a user-friendly manner is paramount. One of the key components in such a setup ... Read moreRead more
We live in a World of virtual assistants with voice interactions, this makes our various tasks much easier. For this purpose different sound sensors are used, which are sensitive to sounds like loud voices, claps, ... Read moreRead more
Infrared Proximity Sensors can be used for different types of applications like obstacle sensing, color detection, fire detection, line sensing, etc, and also as an encoder sensor. The sensor provides a digital output of 5v ... Read moreRead more
LEDs are becoming the first choice for automotive exterior lighting. However, the diodes and their drivers need to meet the relevant automotive standards, and additional short circuit and EMI protection may also need to be ... Read moreRead more
Introduction Controlling a 5V SPDT relay module with an MC-38 magnetic reed switch using an Arduino Uno microcontroller is a simple yet powerful way to automate various tasks and control electrical devices remotely. With the ... Read moreRead more
An LED audio level meter is an electronic testing device that shows the intensity level of any audio signal with respect to its audio amplitude. It has become an essential piece of electronic testing equipment ... Read moreRead more