PicoPlay
PicoPlay is a hand-held retro game console with built-in multiplayer support.
Author: ΘtefΔnescu Andrei-Cezar
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-andrewstephengames
Description
PicoPlay is a hand-held device which allows players to enjoy a multiplayer in a tiny retro package. Users can either choose to play a classic singleplayer game or the baked in multiplayer game called Retro Heroes. Multiplayer is done either among PicoPlay clients or between PicoPlay and web browser clients. To power the experience, a server binary is run on a cloud computer, which the players connect to.
Motivation
My motivation to embark upon this project came from some of my previous personal projects, which all have a retro theme (see [1] [2]. Since I got into programming because of my passion for retro games, I am motivated to build a device from the ground up that includes the best games that I've written over the years, and allows for a solid platform for any future ports.
Architecture
Basic diagram
Main components used:
-
Raspberry Pi Pico 2W
-
the platform that we use
-
Connections:
-
5 buttons, one buzzer, one LED on GPIO
-
LCD touch screen on SPI
-
Game server on LAN (optional)
-
-
-
GPIO components
-
Left button: GP18
-
OK button: GP19
-
Right button: GP20
-
Up button: GP21
-
Down button: GP22
-
Green LED boot indicator: GP16
-
Buzzer: GP17
-
-
Touch screen module
- 2.8" LCD module with the ILI9341 controller: SPI
Logβ
Week 5 - 11 Mayβ
Week 12 - 18 Mayβ
Week 19 - 25 Mayβ
Hardwareβ
The hardware consists of the Raspberry Pi Pico 2W microcontroller and various peripherals connected to it.
There are five buttons connected that control the graphical interface: Left, Ok, Right, Up and Down. Also, a small green LED is attached, indicating the boot status of the board.
The most important peripherals attached are the ILI9341 touch screen module and the buzzer, which allow for an embedded game development platform. Every single peripheral is attached via GPIO, except for the screen, which communicates with the board via SPI. On the screen we draw a menu, allowing the user to select from a list of games to play.
Schematicsβ
Electrical schematic
Bill of Materialsβ
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The microcontroller | 39.66 RON |
2.8" SPI LCD Module with ILI9341 Controller (240 x 320 px) | Displaying graphics | 69.99 RON |
Passive Buzzer | Buzzer | 0.99 RON |
4x Red Button with Round Cover | Button | 7.96 RON |
Blue Button with Round Cover | Button | 1.99 RON |
Plusivo 3 mm and 5 mm Diffused LED Light Emitting Diode Assortment Kit | LEDs and resistors | 26.99 RON |
2x 20 cm 10p Male-Female Wires | Male to female wires | 7.98 RON |
10 cm 40p Male-Male Wires | Male to male wires | 4.99 RON |
Softwareβ
Library | Description | Usage |
---|---|---|
embassy-rp | The embassy embedded framework | Initializing and interacting with peripherals |
embassy-executor | An async/await executor designed for embedded usage | Asynchronous programming |
embassy-time | Timekeeping, delays and timeouts. | Delays |
embassy-sync | Synchronization primitives and data structures with async support | Synchronizing tasks |
ili9341 | ILI9341 display driver | Controlling the display |
embedded-graphics | 2D graphics library that is focused on memory constrained embedded devices | Drawing graphics without using any buffers |
embedded-hal-async | An asynchronous Hardware Abstraction Layer (HAL) for embedded systems | Asynchronous hardware access |
gpio | GPIO management | Controlling GPIO pins |
pwm | PWM module | Controlling the buzzer and the intensity of the boot LED |