processing

You are currently browsing articles tagged processing.

Have you ever wanted to build your own wearable spy camera, UAV or other small, camera-enabled gizmo, gadget or device? While Arduino provides a wonderful prototyping platform for creating all sorts of DIY electronic gadgets, experimentations in physical computing, robotic artworks, and the like, it’s slim pickins’ when it comes to finding a tiny, easy-to-use digital camera to pair it up with. Fortunately, a company out of Hong Kong, COMedia Ltd., makes the C328R, a relatively small cell-phone style camera module that includes built-in JPEG image compression and UART serial communication. Couple the camera module with an Arduino and external storage (EEPROM, microSD, etc.) and you can have an instant Arduino-powered digital still image or video capture solution. That is to say, “instant,” once you have a working software driver … Fortunately for you, I’ve already done that work.

While working on a pigeon-based aerial photography solution as part of PigeonBlog for Beatriz da Costa, I wrote a library in C++ that allows the Arduino to communicate with the C328R camera over UART using the camera’s built-in communications protocol. Here’s a sample picture to prove that it works:

Sample C328R picture

Sample C328R picture

The camera can take pictures in a variety of color depths (2- to 8-bit grayscale, 12- to 16-bit color, JPEG) and resolutions (80×64 to 640×480) with serial communication up to 115,200 baud. It’s fairly versatile and not terribly expensive (~$50) given the fact that it does a lot of work for you (i.e. on-board JPEG compression).

The rest of this post assumes that you have the camera and an Arduino Duemilanove (or similar) in hand. If you don’t, I suggest that you get them. You’re also going to need some type of external storage for the pictures, because the Arduino doesn’t provide any sufficient storage on-board. The sample code that follows assumes a 256KB Atmel SPI serial EEPROM or similar SPI EEPROM.

Read the rest of this entry »

Tags: , , , ,