This project implements a game control system using the Raspberry Pi Pico / Raspberry Pi Pico W. It can be used to map the MPU6050 sensor to control the W
, A
, S
, D
keys via USB connection to the device, allowing for intuitive and innovative movement in games.
- Tilt detection with the MPU6050 sensor.
- Mapping of WASD keys based on the tilt.
- Execution via CircuitPython directly on the Raspberry Pi Pico.
- Ready to GO with just a USB connection needed.
- Raspberry Pi Pico / Raspberry Pi Pico W.
- MPU6050 sensor.
- CircuitPython installed on the Raspberry Pi Pico.
- Libraries inside the Raspberry Pi Pico folder.
-
Install CircuitPython on the Raspberry Pi Pico by following this guide and placing this UF2.
-
Copy the necessary files to the Pico.
-
Install libraries:
- Copy the libraries from the project folder
lib\9.x
to thelib/
folder on the Pico.
- Copy the libraries from the project folder
-
Run the code:
- Save and place the Python code (
main.py
andboot.py
) at the root of the Pico. - Restart the device (unplug and plug the USB back in) to start the controller.
- Save and place the Python code (
- Tilt the Raspberry Pi Pico forward/backward/left/right to trigger the
W
,A
,S
,D
keys. - The movement will be interpreted and sent as keyboard input to the game.
- To stop the controller, disconnect the Pico or remove the code.
This project is distributed under the GPL-3.0 license.