Arduino Lights

arduino: open source micro controllers

Arduino is an open source community micro controller that can do almost anything! That’s a big claim…..but it’s true
Basically arduino is a way to move from a computer into the real world, so stuff just doesn’t happen on the screen but can turn on a light, activate a motor, take data from the world like through switches and sensors.

press the red button to go to the ‘arduino page’
red-button

This code turns on and off LED lights

+++++++++++

// LED code with switch
const int pin13 = 13;
const int pin12 = 12;

void setup () {
pinMode(pin13, OUTPUT);
pinMode(pin12, OUTPUT);
pinMode(2, INPUT);
pinMode(3, INPUT);
Serial.begin(9600);
}

void loop () {
if (digitalRead(2) == HIGH) {
digitalWrite(pin13, HIGH);
Serial.print (“red LED on”);
}
if (digitalRead(3) == HIGH){
digitalWrite(pin12, HIGH);
Serial.print (“yellow LED on”);
}

else {
Serial.print(“the switch is really really off!!!!”);
}
}