Many of you might have thought of controlling a car in a racing game with your hand gestures. Motion control can work really well for gaming, as evidenced by the Nintendo Wii and Wii U. Maker Hriday Barot has come up with a similar and exciting project that controls almost any game, while in this case, he has demonstrated the famous Asphalt 8: Airbone racing game.
Hriday Barot has built the unit using a Raspberry Pi Pico that is programmed using CircuitPython. This controller is connected to the Invensense’s MPU6050 gyro and accelerometer. The MPU6050 module output is taken by the Raspberry Pi Pico, which helps it control any game. One of the exciting things about this project is that it uses minimal hardware. Apart from the controller and MPU6050 module, you only require jumper wires.
Other than the hardware, you need to get CircuitPython on the development board. “To do that you simply need to download the uf2 provided from the link below, then press the BOOTSEL button and connect your pico to the pc (while pressing it) and copy the uf2 file to the pico and disconnect you pico,” says the maker.
To connect the MPU6050 module with the Raspberry Pi Pico, follow the connections shown in the reference figure above. After this, you only need to connect the Raspberry Pi Pico with the laptop to burn the code. Hriday Barot provided the code in the official blog post. With that, you are ready to play Asphalt 8 with hand gestures. For all those interested in trying out this project, you can get more details on the blog post or Reddit thread.