Play Game using Joystick on Maker Uno RP2040

Play Game using Joystick on Maker Uno RP2040

Introduction

The Maker Uno RP2040 is a Raspberry Pi-powered microcontroller board. It communicates with a joystick via a Grove port, letting users to control PC games with a connected joystick. The CircuitPython programming language is used, and the board is easy to use and accessible to developers of all skill levels.

 

Hardware Preparation

Circuit Connection

 

 

CircuitPython Library Installation

1. Download the CircuitPython Libraries Bundle.

2. Extract the downloaded ZIP file.

 

3. Open the extracted ZIP file then select lib folder.

 

4. Search for adafruit_hid in the lib folder and copy that file.

 

5. Plug in Maker Uno RP2040 via laptop USB port.

 

6. A new driver will appear under this PC option named CIRCUITPY(D:).

 

7. Click the driver get into the driver and select lib folder.

 

8. Paste the previously copied folder into lib file in CIRCUITPY(D:) and your interface should look like as shown in the picture below.

Sample Program 

1. Open Thonny IDE.

 

2. Copy code below and paste the code into Thonny IDE.

 

3. Then save as code.py in Maker Uno RP2040 board.

 

4. Name the folder as shown below.

 

7. Click the bottom right corner to select the board port.

 

8. Choose a board port from the list.

 

9. Click the run button or enter F5.

 

10. Now able to use joystick as keyboard arrow keys.

Thank You

 

"Remember, this tutorial is designed for you to try and learn.
You are invited to change the code to create a better application."

Hardware Components

Grove 4 Pin Buckled to Female Cable Best Seller
x 1 unit(s)

Maker Uno RP2040

S$18.00 S$18.00

x 1 unit(s)