Unveiling Picoboy: A Mini Gaming Marvel Redefining Fun with Raspberry Pi!

152
Unveiling Picoboy: A Mini Gaming Marvel Redefining Fun with Raspberry Pi!
(Image: Johannes Hiltscher, Golem.de)

We’ve already realized various projects using the RP2040, the microcontroller from the Raspberry Pi Foundation. So, we were quite excited when offered the chance to test the Picoboy. This mini-computer, about 50mm wide and 30mm tall, is primarily designed for learning programming in computer science classes. However, it also holds appeal for hobbyist developers. With it, we programmed an Asteroids clone.

The Picoboy is a complete, small, and mobile gaming console: equipped with a monochrome 1.3-inch OLED display, a five-way joystick, and an accelerometer for control. Additionally, on the back, there’s a holder for a CR2023 button cell that powers the Picoboy on the go, along with a small speaker. GPIO pins aren’t exposed—there’s hardly any space on the small board for them, and pin headers would be a nuisance while handling.

At the core of the Picoboy is the RP2040 microcontroller, featuring two ARM Cortex-M0+ cores and 264 kilobytes of RAM. Similar to the Raspberry Pi Pico, it contains a 2-megabyte flash memory for storing programs and data. These can be loaded via a USB-C port, which also serves as the power source. A slide switch on the left side toggles between USB and the button cell power.

Easy to use thanks to the RP2040 ecosystem

When we received the Picoboy, it came pre-installed with demos like Pacman, Snake, Tetris, and Conway’s Game of Life (always a good choice), along with an Amiga-style demo application with 3D graphics. Developer and Amiga enthusiast Jan Schulz, in conversation with us, shared that he invested a lot of time into this demo. But of course, we wanted to create our own game too.

To do this, we first installed the MicroPython interpreter, a process identical to that of the Raspberry Pi Pico: hold down the boot button on the back and then connect a USB cable to a computer. The RP2040’s bootloader switches to programming mode, recognizing the board as a USB mass storage device, allowing us to copy a program file in UF2 format into the flash memory. Unlike the Raspberry Pi Pico, the Picoboy also features a reset button.

The Picoboy’s homepage provides a Python file that abstracts the board’s input and output hardware, making it usable through simple functions. For display graphics, it utilizes MicroPython’s framebuffer library. Using the Thonny editor, we copied it into the Picoboy’s flash memory to integrate it into our code.

Alternatively, development for the Picoboy can be done using the Arduino environment, CircuitPython, or PlatformIO. Setting up the Arduino environment is explained on the Picoboy’s homepage, where the display can also be addressed through a library. Additionally, there’s an introduction to programming using the Arduino environment and MicroPython on the homepage.

Asteroids Clone in a Few Hours

For our programming project, we chose to create a clone of the arcade classic Asteroids: navigating a spaceship safely through an asteroid field. We used the accelerometer to control the spaceship, the joystick to rotate it, and firing lasers with a press of the joystick.

In just a few hours, rocks and the spaceship (with animations) flew across the display. Thanks to MicroPython’s framebuffer library, pixel graphics (sprites) could be conjured onto the screen within minutes. However, finer details like collision detection took a bit longer. We also had to experiment initially with sound output before the speaker produced (albeit quiet) tones.

Custom-made games not only motivate us but also resonate with the intended audience, as the developer shared with us.

READ MORE: Microsoft’s New Outlook Raises Concerns Over Data Transfer to Cloud Servers

Previous articleMicrosoft’s New Outlook Raises Concerns Over Data Transfer to Cloud Servers
Next articleGoogle Unveils Next-Gen Fido Sticks: Passkey Security for Safer Authentication Online!
Michael Lynch
With a passion for cybersecurity, Michael Lynch covers data protection and online privacy, providing expert guidance and updates on digital security matters.