Tom Granger's PD-Camera Adds Black-and-White Photography Capabilities to Panic's Playdate Console

By abusing the serial connectivity on the Playdate's USB port, this Game Boy Camera-inspired accessory offers still and video capture.

Maker Tom Granger has achieved the seemingly-impossible and built a camera accessory for Panic's unusual hand-crank handheld games console, the Playdate — inspired by the Nintendo Game Boy Camera of old.

"This project is built on the shoulders of my previous playwrite project," Granger explains, referring to an effort to connect a keyboard to a Playdate console to use it as a distraction-free electronic typewriter, "in which I also used a Teensy microcontroller to connect gamepads and even keyboards to the Playdate without the need for a computer in-between (well, in reality the Teensy is that computer). At first sight this should not be possible, because the Playdate's USB port is a client, not a host. It would be like connecting a gamepad to a hard disk."

Like the Nintendo Game Boy before it, the Panic Playdate now has a camera accessory — albeit an unofficial one. (📹: Tom Granger)

The Playdate, for those unfamiliar, is an unusual portable console with a low-power monochrome memory-LCD display and a hand-crank controller which pops out of the side. Inside the bright yellow chassis is an STMicro STM32F746 microcontroller on which its games run, along with an Espressif ESP32 for Wi-Fi and Bluetooth connectivity. There's a USB Type-C port at the bottom, but this is primarily used only for charging — with one big exception.

"The Playdate provides serial over USB," Granger explains, "which is normally used by the SDK [Software Development Kit]'s Simulator app running on a computer to talk to the console (send game builds, debug, reboot, take screenshots, etc). So the Playdate is a [USB] client, the host being the computer. For this project I took the general concept one step further and transmit a lot more data to the Playdate."

That data comes courtesy of an Omnivision OV7670 camera sensor, connected to the Teensy and configured to capture grayscale rather than color imagery — taking the YUV image data and zeroing-out U and V. The captured image is then dithered in software down to a single bit, then passed along to the console — which is enough to display it on-screen, but to actually create a functional camera required a little more work.

"Playdate can natively save an image as .gif, so we do that for stills," Granger notes. "But videos are another story. There is no way to encode a series of images as .pdv (Playdate's proprietary video format) or .gif. So what we do instead is save all the images in a temp folder, the use another C function to encode an animated .gif and write it on the file system. All in all it runs at about 3-4 fps and that's currently the speed of the 'videos' we can record."

Hardware design files and source code for the project are available on Granger's GitHub repository, under the permissive MIT license.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles