The Adafruit PyGamer is an all-in-one handheld gaming device designed for DIY gaming, electronics projects, and educational purposes. It is powered by the ATSAMD51J19 microcontroller and is capable of running CircuitPython, MakeCode Arcade, or Arduino code. The PyGamer is equipped with a 1.8-inch 160x128 color TFT display, a microSD card slot for expandable storage, a buzzer-speaker for audio output, and a variety of input buttons and a joystick for user interaction. It is an excellent platform for developing retro games, learning programming, and creating interactive projects.
Pin Number | Function | Description |
---|---|---|
1 | A Button | Gamepad A button input |
2 | B Button | Gamepad B button input |
3 | Joystick X | Analog joystick X-axis |
4 | Joystick Y | Analog joystick Y-axis |
5 | Start Button | Gamepad Start button input |
6 | Select Button | Gamepad Select button input |
7 | D-Pad Up | Gamepad D-pad up input |
8 | D-Pad Down | Gamepad D-pad down input |
9 | D-Pad Left | Gamepad D-pad left input |
10 | D-Pad Right | Gamepad D-pad right input |
11 | Light Sensor | Ambient light sensor |
12 | NeoPixel | Addressable RGB LED (NeoPixel) |
13 | Speaker | Buzzer-speaker output |
14 | SD Card Detect | MicroSD card insertion detection |
15 | Battery | Battery voltage monitoring |
16 | 3.3V | 3.3V power output |
17 | GND | Ground |
Powering the Device: The PyGamer can be powered via the USB connection, a 3.7V LiPo battery, or a 5V DC jack. Ensure that the power source is connected properly before use.
Programming the Device: Connect the PyGamer to your computer using a USB cable. The device should be recognized as a removable disk. You can drag and drop your CircuitPython or Arduino code onto the device.
Using the Display: The TFT display can be accessed using the Adafruit libraries for CircuitPython or Arduino. Initialize the display in your code to start drawing graphics or text.
Reading Inputs: The buttons and joystick can be read using digital and analog input pins, respectively. Use the appropriate libraries and functions to detect button presses and joystick movements.
Audio Output: To play sounds, use the buzzer-speaker with the audio libraries available for CircuitPython or Arduino.
Expandable Storage: To use the microSD card slot, insert a formatted microSD card and use the SD card libraries to read and write files.
Q: Can I use the PyGamer with languages other than CircuitPython or Arduino?
A: The PyGamer is primarily designed for use with CircuitPython and Arduino. Other programming environments may be supported, but functionality could be limited.
Q: How do I update the firmware on the PyGamer?
A: Firmware updates can be done by downloading the latest UF2 file from Adafruit and dragging it onto the PYGAMERBOOT drive that appears when the device is in bootloader mode.
Q: What is the maximum size of the microSD card that the PyGamer can support?
A: The PyGamer typically supports microSD cards up to 32GB, but larger cards formatted as FAT32 may also work.
Q: Can I connect additional sensors or components to the PyGamer?
A: Yes, the PyGamer has JST connectors for I2C and UART, as well as a 4-pin STEMMA connector for easy expansion.
For more detailed information and resources, visit the Adafruit Learning System or the PyGamer product page.