Archive for the ‘Level 1’ Category

Video Experimenter on the Seeeduino Mega

The nootropic design Video Experimenter shield uses some pretty advanced features of the Arduino’s ATmega328 microcontroller. One downside of this is that you can’t use the Video Experimenter shield on an Arduino Mega. Why? Well, the designers of the Arduino Mega didn’t connect a lot of the ATmega1280/ATmega2560 pins to headers on the board so that you could use them! And, as it turns out, the pins with key features utilized by the Video Experimenter are not connected to anything!

To perform video overlay, the Video Experimenter relies on an input capture pin (to capture the exact time that the pin has changed state). Even though the ATmega1280/ATmega2560 has 4 input capture pins, none of them are connected!

Important pins not even connected!

And to capture video images in the Arduino’s memory, Video Experimenter uses the analog comparator in the chip. But the AIN0 pin for the analog comparator is not connected! What were the Arduino Mega designers thinking?

Fortunately, there is the Seeeduino Mega. The guys at Seeed Studio broke out nearly all the pins on the ATmega1280 so that you can use them. I love the Seeeduino Mega because it provides so many pins on a rather small board.

Simply make 5 connections with jumper wires and you can use the Video Experimenter on the Seeeduino Mega. No code changes necessary!

By connecting 5 jumper wires, you can use the Seeeduino Mega

Here are the connections to make:
11 to 9 (white wire in picture above)
7 to 29 on the Seeeduino Mega (yellow wire)
INPUT pin on the Video Experimenter to PE2 on the Seeeduino Mega (green wire)
SYNCOUT pin on the Video Experimenter to PD4 on the Seeeduino Mega (gray wire)
VSYNC pin on the Video Experimenter to 21 on the Seeeduino Mega (brown wire)

Now you can use the Video Experimenter with an Arduino that has a more powerful processor. It really helps to have 8K of SRAM instead of 2K. Now you can do text and graphics overlay with higher resolutions, like 192×128. Have fun!

Published by Michael, on July 13th, 2011 at 2:02 pm. Filed under: Arduino,Level 1,Video. | 14 Comments |

Tutorial: PCB Design T-Shirt

I recently had the idea of printing a PCB design on a t-shirt. Since I don’t do my own silkscreening, I just wanted to upload my EAGLE PCB design to a custom t-shirt provider and have them do the hard part. In this post I’ll show you how you can do the same for your favorite board design. Mine turned out great!

Photo by Paul Sobczak

First, I exported my board design from EAGLE by choosing File -> Export, then picking Image from the next menu. You want your image to be high resolution, so increase the DPI value to at least 400 to give you a large image. Choose a file location for your large PNG file.

In Eagle, choose File -> Export, then choose Image

I then used Custom Ink to have the t-shirt made. I chose a black short sleeve Hanes Beefy-T. The shirt design tool makes it easy to upload an artwork image. After uploading, it asks you to choose the colors that are in the image. My standard Eagle board image has red, blue, white, green, and yellow. The colors you choose don’t have to exactly match your image — it’s just for accurate pricing.

Choose colors included in your image.

Then I resized the image so that it filled the front of the shirt. I also made sure to select the checkbox that says “keep the white in my image”.

Resize and position your PCB design

Next, get a quote and order a shirt. Mine only cost $24.75 and shipping was free in the U.S. I thought this was a great price and was really happy with the result!

Published by Michael, on May 21st, 2011 at 1:40 pm. Filed under: Art,Level 1. | 1 Comment |

Digit Shield Temperature Display

Difficulty Level = 1 [What’s this?]

The Digit Shield makes it trivial to add a numeric display to your project. I’ve used my simple LM34 temperature sensor in many projects, but this is the simplest. Here’s the LM34 sensor connected to analog input pin 0 on the Arduino, with the temperature displayed on the Digit Shield.

The code reads the sensor value, translates to millivolts, and then translates to a temperature (the sensor outputs 10mV per Fahrenheit degree). The Digit Shield library makes it so easy to display the temperature. Here’s the entire Arduino sketch:


float AREF = 1.1;

void setup() {

void loop() {
  int r = analogRead(0);
  int mv = (((float)r/1023.0) * AREF) * 1000.0;
  double t = mv / 10.0;

Published by Michael, on March 19th, 2011 at 4:27 pm. Filed under: Arduino,Level 1. | 1 Comment |

Reaction Timer

Difficulty Level = 1 [What’s this?]

How fast can you press a button once a timer starts counting? Find out by attaching a button to your Arduino and the Digit Shield. A simple tactile button switch is connected to digital pin 8 and ground.

Press the button once to start the sequence. First the Arduino will wait a random amount of time between 2 and 5 seconds, then it will start counting milliseconds on the display. As soon as you see the numbers start, press the button again to stop the count. Then repeat: press the button again to clear the display and start the random wait before the numbers start counting again.

Here is the complete code:

#include <DigitShield.h>
#define BUTTON 8

unsigned long start, stop;

void setup() {

  pinMode(8, INPUT);
  digitalWrite(8, HIGH);


void loop() {
  // wait until button press
  while (digitalRead(BUTTON) == HIGH);

  // turn off the display

  // delay from 2 to 5 seconds
  delay(random(2000, 5000));
  start = millis();

  while (true) {
    DigitShield.setValue((int)(millis() - start));
    if (digitalRead(BUTTON) == LOW) {
      stop = millis();


Published by Michael, on March 18th, 2011 at 4:40 pm. Filed under: Arduino,Level 1. | 22 Comments |