A tiny Arduino project

This topic was already discussed at Make Magazine but I’d like to publish my own attempt.

http://blog.makezine.com/2011/10/10/how-to-shrinkify-your-arduino-projects/

I hooked up my ATtiny85 (which I just received for my birthday) with my Arduino Duemilanove and some LEDs. I have more complex plans for the ATtiny85 so this post is only  a quick test for me to see how things are working.



I followed the instructions on the original project site and everything went smooth.

http://hlt.media.mit.edu/?p=1695

Here’s a video of it: (I’m only using the Arduino to get 5V)

The code running on it:

/*
  Blink
  Turns on 3 LEDs on then off, repeatedly.

  This example code is in the public domain.
 */

int led1 = 0;
int led2 = 1;
int led3 = 2;

// the setup routine runs once when you press reset:
void setup() {                
  // initialize the digital pins as an output.
  pinMode(led1, OUTPUT);     
  pinMode(led2, OUTPUT);     
  pinMode(led3, OUTPUT);     
}

// the loop routine runs over and over again forever:
void loop() {
  digitalWrite(led1, HIGH);   // turn LED1 on (HIGH is the voltage level)
  delay(100);               // wait for a second/10
  digitalWrite(led1, LOW);    // turn LED1 off by making the voltage LOW
  digitalWrite(led2, HIGH);    // turn LED2 on by making the voltage HIGH
  delay(100);               // wait for a second/10
  digitalWrite(led2, LOW);    // turn LED2 off by making the voltage LOW
  digitalWrite(led3, HIGH);    // turn LED3 on by making the voltage HIGH
  delay(100);               // wait for a second/10
  digitalWrite(led3, LOW);    // turn LED3 off by making the voltage LOW
}
Advertisements

2 thoughts on “A tiny Arduino project

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s