Low-Fi, High-Vibe: 1-Bit Dithered Video from a $12 Camera
I've seen the video feed from the ESP32-CAM, it's rough. I wouldn't be interested in this thing if it didn't have a camera and Wi-Fi, it has very very accessable pins and most of them aren't useful for GPIO. If you try to use the 4 wire SPI connection to the built in SD card, there's almost nothing left to work with. There's probably a way to connect a color display and use the SD card at the same time, but I didn't get there.
Just take a picture.
Expectations lowered, I was curios if I could capture an image to the SD card without additional components. It would be great to have some sort of viewfinder, but I couldn't get enough pins free even for a two wire i2c connection. So I added a button and created a tiny camera.
It's not that difficult:
You can even algorithmicly de-enhance the image synchronously.
I'm filming you
Shooting video and saving it to the SD is a little more tricky. I never planned on take high quality of high resolution video. Using a config.frame_size of FRAMESIZE_CIF is a good place to start at 400x296 for a decent framerate. The other trick that I discovered is to use PIXFORMAT_JPEG for config.pixel_format. If you use this format you can dump the frames directly into a mjpeg file without additional processing.
Shoot first
I used this script to process the .mpjeg files to .mp4 to play on my Mac. Trying to process the video in real time on the device takes the framerate down to single digits or less. I decided to take the simple route and just process the video off the device, there's no screen anyways. With a screen, there might have been a reason to process asynchronously.
mpjeg to mp4
Going outside.
I needed a little case to house the camera, so I designed this ugly thing. It's got great UX; No Screen, No record indicator and the power switch is a finicky rc-model power connector. It's also fully self contained, tough, tiny and if you squint into the case you can see the recording light flash when it's done writing to the SD card.
So Handsome.
Camera on the front, button on the back and battery on the bottom.
It spins
Here's some sample video.
99% Inspired by playdate
This project was very much Inspired by Playdate. With it's resolution of 400 x 240 pixels the high-resolution monochrome (1-bit) LCD screen would be perfect for a 1bit camera.
Here's a list of inspiration
https://play.date/games/blippo/
https://blippo.plus/
https://play.date/
https://sharpdevices.com/memory-lcd/
https://www.ifixit.com/Teardown/Playdate+Teardown/143811