Today, our team put our ultrasonic sensor project to the test. We built a system where two ultrasonic sensors measured the distance between a wall and both the head and leg. The idea was simple: when the measured distance increased—indicating a jump or a duck—the Arduino would trigger a servo motor to simulate a keyboard keystroke. This setup was meant to control a game, similar to the classic T-Rex runner.
*Completed Setup For T-REX 2.0 Project.
*The sudden rise of the value from the bottom sensor means the player is jumping.

During testing, we noticed that the system wasn’t as responsive as we hoped. There was a noticeable input lag between the sensor readings and the servo motor’s action, causing occasional misses in jumps and ducks. While it did work to a certain extent (about 70% of a finished product), the delay proved to be a significant drawback. We suspect the lag was due to the inherent delay in the ultrasonic sensors and the time it takes for the servo motor to react—factors that are critical when fast response times are needed for game controls.
Project Twist
Determined to achieve a 100% finished product and overcome these limitations, our team decided to change direction. We brainstormed and came up with an exciting twist: instead of relying on ultrasonic sensors and servo motors, we’d build a more advanced, wireless controller to play advanced (more fun) games like Subway Surfer.
We started with very neat and clean wiring, soldered pins to MPU-6050 and placed into the board (and we glued it to the board to keep it secured), connected and glued HC-06 Bluetooth device to the board. It took us a lot of time to complete this hardware setup as we faced a lot of challenges including voltage issue for bluetooth device, miss-wiring/loose connections and a lot of troubleshooting. We we were near the finish line, yet to finish the coding part.
