There are two code examples for the library, one for the 2.8" Touch Shields, another for the 1.8" TFT Shield with buttons. The latter example lets you save images to a microSD card.

Modifying the Camera

Gather up…

  • Camera
  • 2.2K resistors (2)
  • Two wires, about 4 inches (10 cm) long, color coded if you like

If your camera arrived with a lens cap, keep that on for now to prevent solder splatter or other mayhem on the lens.

Two pins on the OV7670 camera board — 3V and GND — get completely removed.

A good hot iron will both melt the solder and soften the plastic of the row header, allowing the pin to be pulled straight out with tweezers or pliers.

If your iron isn’t up to the task, get creative with flush cutters.

Don’t struggle or you’ll peel a trace off the PCB. Please, gently the kobolds.

With the pins removed, clip away that part of the row header plastic, then clear out the vias with a solder sucker or wick. You should be able to see right through those two holes.

The two resistors will connect to the SDA and SCL pins at one end, and both go to 3.3V at the other end.

We’ll also be putting a wire through the 3.3V via but there’s only so much room, so you might need to economize on space by joining the resistors so only one leg goes into the hole.

Melt the solder on SDA and SCL and tack each resistor into place. Might take a few tries. Then the other end, plus one wire, are soldered to the 3.3V spot.

Other wire goes into the GND via. No resistors there, this one’s straightforward.

Power and Connections

The camera requires 3.3V power. There is NO voltage regulator on the carrier board and 5V will DAMAGE it!

This is easy with the 1.8" TFT shield: there are pins labeled 3V and GND a few spots to the right of the A/B/C buttons.

The larger TFT Touch Shield obscures a lot and requires some creativity to access a 3.3V pin. In this case it was soldered to the corresponding header pad on the back of the shield.

With the camera header now reduced to 16 pins (2 rows x 8 pins), here’s where it plugs into the Grand Central board — pins 24 through 29.

You can quickly align this visually by just skipping the top 2x2 pins.

If the header is misaligned…up or down by one pin…nothing will happen, the camera just won’t respond. But be super extra careful of those top two pins, which carry 5 Volts and would damage the camera.

The 2-row header has a pair of GND pins at the bottom…that’s what we’ll use for ground when using the TFT Touch Shield.

Here’s how everything looks installed. The wiring is unattractive and delicate, but this is wild west stuff.

Camera Orientation

Please note that with the camera installed this way — with the silkscreen on both the camera board and Grand Central in a readable orientation — the camera’s actually rotated 180°. Its idea of “up” is the other way ’round.

The examples compensate for this by also rotating the display output 180°. These are mostly just copying data straight from the camera to the screen and don’t care. But if you’re doing any actual image processing, anything requiring a specific orientation, keep that in mind, that you’ll want to hold the board the other way, with the silk upside-down.

This guide was first published on Jul 28, 2020. It was last updated on 2020-08-03 17:33:53 -0400.
This page (Hardware) was last updated on Aug 02, 2020.