Arduino Uno for Christmas

Img_20101226_193345

I was lucky enough to be given an Arduino Uno for Christmas. For those who haven't heard of Arduino before, it's an open-source programmable electronics prototyping board. It allows you to write code then flash it onto the board and interact with other electronic components such as LEDs or speakers.

For me the Arduino is the perfect combination of software and hardware. It allows me to programme then see that code interact with the physical world. For example, it only took an hour of experimenting to get a little flashing traffic light system working. The code is similar to C++, and while I'm more experienced with JavaScript and Python it was relative easy to get use to. Here's the code:

int redPin = 10;
int yellowPin = 9;
int greenPin = 8;

void setup() {
    pinMode(redPin, OUTPUT);
    pinMode(yellowPin, OUTPUT);
    pinMode(greenPin, OUTPUT);
}

void loop() {
    digitalWrite(redPin, HIGH);
    delay(300);
    digitalWrite(yellowPin, HIGH);
    delay(300);
    digitalWrite(greenPin, HIGH);
    delay(2000);
    digitalWrite(redPin, LOW);
    digitalWrite(yellowPin, LOW);
    digitalWrite(greenPin, LOW);
    delay(300);
}

 

As you can see it's relatively simple. The fun part is wiring it all up the breadboard with resisters and LEDs and seeing the flashed code running.

I'm really looking forward to making more advanced devices, ultimately culminating in a robotic arm which has always been a dream of mine to build.