Skip to content
/ pd-camera Public

Experimental camera addon for the Playdate handheld console

License

Notifications You must be signed in to change notification settings

t0mg/pd-camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PD-Camera project

PD-Camera is an unofficial, experimental accessory for Panic Inc.'s Playdate handheld console, which as the name hopefully suggests allows the device to record pictures as well as animated gifs, in whopping 1-bit color and QVGA (320x240) resolution. Kind of similar to the 1998 accessory for that other monochrome handheld device (which has 2-bit color and fewer pixels).

This repository contains the hardware and firmware of the PD-Camera accessory. The source for the companion app that runs on the Playdate itself can be found here.

Here's a one minute intro video (click to watch).

Watch the project's trailer video on YouTube

And a four minute demo that was part of Tiny Yellow Machine's Playdate Community Direct. Goes a bit more into details and shows video recording (click to watch).

Longer demo introducing video feature, as part of the TYM Community Direct

Disclaimer

This project is

  • not affiliated with nor endorsed by Panic Inc.,
  • highly experimental,
  • very hacky,
    • oh so hacky.

While I crashed my own Playdate countless times working on this, and it has survived so far, I cannot be held responsible for any damage, data loss, bad selfie, pandemic, etc. that might occur to you while playing with this project. Use this at your own risk. Thanks ❤️.

How does it work? Why does it exist?

For more context on how this project came to be, you can find its devlog on Playdate's Dev forum and a deep dive into how it all works here.

Otherwise read on for an overview of each part.

Hardware

Configurations

The Playdate can be attached to the camera accessory in three distinct configurations: cover, camera, and selfie.

The accessory is holding onto the Playdate with small magnets. In camera mode. A USB C cable plugs into the console and disappears inside a "chin" in the bottom of the accessory. In cover mode the Playdate can be unplugged and flipped with its screen facing backwards, in order to lay flat and protect it during transport.

Transforming from cover mode to camera mode

The Playdate can also be fitted on the back of the accessory, without unplugging the cable, allowing to switch the camera to selfie mode (the companion app has a mirror option so it doesn't feel awkward). Additional magnets are here to secure the console in this configuration too.

Switching to selfie mode

What's inside

The project is based on a Teensy 4.1 microcontroller that acts as a USB host to the Playdate and communicates with it over serial, including evaluating payloads in the Lua runtime (see here for more details). The Teensy is also connected to an OV7670 camera module via its CMOS Sensor Interface (CSI) built into the IMXRT1062 MPU and using this dedicated library. The images produced are 1-bit, QVGA (320x240 pixels) and recorded directly in the Playdate's filesystem. The Teensy takes care of dithering the images in various ways before sending them to the Playdate.

A battery, custom PCB and a custom 3D-printable case complete the hardware (gerber and stl files are provided in this repository).

For the detailed bill of material and assembly instructions, hop over to the hardware folder.

Firmware

To flash the Teensy microcontroller with the project's firmware, you'll need the Teensy loader application.

If you don't want to modify the source, you can directly grab a prebuilt firmware.hex file from the repository's releases. Otherwise, read on to build your own.

Companion app

The app that needs to be sideloaded onto the Playdate is located in a separate repository.

Building

This project uses PlatformIO to manage dependencies and build toolchain, see platformio.ini.

The source code comprises a single, messy main.cpp file, which relies on a few excellent libraries listed below.

Credits

Dependencies

Made possible by


Playdate is © Panic Inc. - this project isn't affiliated with or endorsed by them in any way (just like that one)