GamePi13
Introduction
- Offers Raspberry Pi series and RP2040-PiZero series tutorials.
- 1.3inch IPS screen with 240×240 resolution, good image quality, bright colors and wide viewing angle.
- It supports RetroPie game system and Recalbox game system, with thousands of classic games. As long as the TF card capacity is big enough, you can add your favorite games at will.
- On-board PWM audio output speaker and earphone Jack, convenient for listening to the familiar BGM.
Specifications
- Working voltage: 3.3V
- Communication interface: SPI
- Screen type: IPS
- Control chip: ST7789
- Resolution: 240(H)RGB x 240(V)
- Display size: 23.4 (H) x 23.4 (V) (mm)
- Pixel size: 0.0975 (H) x 0.0975 (V) (mm)
- Product size:65 x 31(mm)
Functional Pins
Functional pins | Board physical pin serial number | BCM coding | Description |
---|---|---|---|
5V | 2/4 | / | 5V power supply positive |
3.3V | 1 | / | 3.3V power supply positive |
GND | 6/9/30/34 | / | Power supply ground |
R | 8 | 14 | Key TR |
L | 16 | 23 | Key TL |
X | 10 | 15 | Key X |
Y | 32 | 12 | Key Y |
B | 38 | 20 | Key B |
A | 40 | 21 | Key A |
Up | 29 | 5 | Key Up |
Left | 36 | 16 | Key Left |
Down | 31 | 6 | Key Down |
Right | 33 | 13 | Key Right |
Select | 35 | 19 | Key Select |
Start | 37 | 26 | Key Start |
DC | 22 | 25 | LCD display data/command selection pin |
SCLK | 23 | 11 | LCD SPI Clock |
CS | 24 | 8 | LCD enable select pin; enabled low, disabled high |
MOSI | 19 | 10 | LCD SPI data input |
RST | 13 | 27 | LCD reset, enabled low |
AUDIO | 12 | 18 | Audio output |
Raspberrypi Tutorial
Pre-installed Image
- For beginners, we provide a pre-installed image to help you get started with the module more quickly. After flashing the pre-installed image, simply insert the TF card into your Raspberry Pi, power it up, and you're ready to go.
- Official Systems:
- Retropie Systems:
Here are the specific configuration steps.
Official Systems
Bookworm system display configuration
Suitable for Rpi4 & Rpi5
Suitable for all Raspberry Pi models
Bullseye/Buster system display configuration
Audio configuration
Button configuration
Run the button press test Demo
sudo wget https://files.waveshare.com/wiki/GamePi13/Doc/Button_press_detector.zip sudo unzip ./Button_press_detector.zip sudo python3 ~/Desktop/button_press_detector.py
Retropie System
Note: This system is not supported on Pi5.
Method one: Use the pre-installed driver image (recommended)
For use with Raspberry Pi Zero/Zero 2W, it is recommended to directly use the #Pre-installed image
Method two: Install the driver
Parameter introduction
By setting the display_hdmi_rotate parameter in the config.txt file, you can adjust the orientation of the HDMI display, including rotation and flipping.
Here is a detailed explanation of the parameters:
display_hdmi_rotate | result |
---|---|
0 | no rotation (default direction) |
1 | rotate 90 degrees clockwise |
2 | rotate 180 degrees clockwise |
3 | rotate 270 degrees clockwise |
0x10000 | horizontal flip |
0x20000 | vertical flip |
- You can also combine settings to achieve more complex effects. For example:
180-degree rotation + horizontal and vertical flip= 0x20000 + 0x10000 + 2 = 0x30002
- If you set display_hdmi_rotate=1(90 degrees) or display_hdmi_rotate=3 (270 degrees), the system will use additional GPU memory to complete the image rotation.
For devices with GPU memory set to 16MB, these options may not work properly. You can modify the gpu_mem parameter in the config.txt file to increase the GPU memory allocation.
gpu_mem=64
RP2040-PiZero Tutorial
Running Demo
Install Thonny IDE
To facilitate the development of RP2040-PiZero boards using MicroPython on your computer, it is recommended to download Thonny IDE.
- Download Thonny IDE and install it according to the steps provided. The installation packages are for Windows versions; for other versions, please refer to thonny.org.
- After installation, you need to configure the language and board environment for the first time. Since we are using RP2040-PiZero, pay attention to selecting the Raspberry Pi option for the board environment
MicroPython
1.Download and unzip the MicroPython firmware in .uf2 format.
2.Hold the BOOT button, connect the device to your computer, then release the BOOT button. A removable disk will appear on your computer. Copy the firmware onto it.
3.Download and unzip the sample program, then upload the code to the Raspberry Pi Pico. Here are the steps.(using the Tetris game as an example)
- In the view, check the files and select the corresponding file path in the left toolbar
- Select all files and right-click to upload
4.After the upload is successful, unplug the USB, insert the GamePi13 into the RP2040-PiZero, and power it on again to automatically run the game program.
CircuitPython
1.Download and unzip the CircuitPython firmware in .uf2 format.
2.Hold the BOOT button, connect the device to your computer, then release the BOOT button. A removable disk will appear on your computer. Copy the firmware onto it, and wait for a few seconds for another disk to appear.
3.Delete all files in the newly generated removable disk, download and unzip the sample program , and copy all files from the "flappybird-CODE" folder of the sample program into the disk, as shown in the figure below.
4.After the copy is successful, unplug the USB, insert the GamePi13 into the RP2040-PiZero, and power it on again to automatically run the game program.
C/C++ Series
Environment Setup
For C/C++, it is recommended to use the Pico VS Code extension, which is a Microsoft Visual Studio Code extension designed to make it easier for you to create, develop, and debug projects for the Raspberry Pi Pico series of development boards. Whether you are a beginner or an experienced professional, this tool can help you develop Pico with confidence and ease. Below, we will introduce how to install this extension and use it.
- Official tutorial:https://www.raspberrypi.com/news/pico-vscode-extension/
- This tutorial is suitable for Raspberry Pi Pico, Pico2, and the RP2040, RP2350 series development boards developed by our company
- The development environment is by default based on Windows, for other environments please refer to the official tutorial for installation
Install VSCode
1.First, click to download the pico-vscode package, unzip it, open the package, and double-click to install VSCode
Note: If you have already installed VSCode, make sure the version is 1.87.0 or higher
Install the extension
1.Click on Extensions, and choose to install from VSIX
2.Select the software package with the vsix suffix and click to install
3.Then VSCode will automatically install the raspberry-pi-pico and its dependent extensions. You can click to refresh to view the installation progress
4.Once the installation is complete, as indicated in the bottom right corner, close VSCode
Configure the extension
1.Open the directory C:\Users\Username, and copy the entire .pico-sdk to this directory
2.Copying is complete
3.Open VSCode and configure the paths for the Raspberry Pi Pico extension
Configurations are as follows:
Cmake Path: ${HOME}/.pico-sdk/cmake/v3.28.6/bin/cmake.exe Git Path: ${HOME}/.pico-sdk/git/cmd/git.exe Ninja Path: ${HOME}/.pico-sdk/ninja/v1.12.1/ninja.exe Python3 Path: ${HOME}/.pico-sdk/python/3.12.1/python.exe
Create a new project
1.After configuration, test by creating a new project. Enter the project name and select the path, then click Create to create the project
Test the official examples by clicking on the Example next to the project name to select
2.Once the project is created successfully, you can proceed to the next steps
3.Select SDK Version
4.Choose Yes to proceed with advanced configuration
5.Select the cross-compilation toolchain. 13.2.Rel1 is suitable for ARM cores, and RISCV.13.3 is suitable for RISCV cores. You can choose either according to your needs
6.Choose the CMake version as Default (the path configured earlier)
7.Choose the Ninja version as Default
8.Select the development board
9.Click compile to compile the project
10.Once the compilation is successful, you will get a .uf2 file
Import a project
1.Open a C example program and import the project. Note: The Cmake file for the imported project must not contain Chinese characters (including comments), as this may cause the import to fail
2.Once you have successfully compiled a .uf2 file, you can proceed to update the firmware
3.After connecting the device to your computer while holding down the BOOT button, release the BOOT button. A removable disk will appear on your computer. Copy the .uf2 file into it.
Update the extension
1.The extension version in the offline package is 0.15.2. After installation, you can also choose to update to the latest version
Open Source Demos
MircoPython Video Demo (github)
MicroPython Firmware/Blink Demo(C)
Raspberry Pi Official C/C++ Demos(github)
Raspberry Pi Official MicroPython Demos(github)
Resources
Demo
Datasheets
Schematic
Softwares
- Chinese Character Modulation Software
- Image2Lcd Image Modulation Software
- Image Modulation Tutorial
- Font Modulation Tutorial
- flash_download_tool_3.9.7
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)