Sorry for the lack of updates, but I have nothing to show recently (but will very, very soon).
I'm Figuring out the Arduino, slowly but surely. My issue now is when I have multiple lights plugged in and on at the same time, they get way too dim, as if the power is spread too thinly among them....
The code I wrote for my bedroom lights:
(This code keeps one light one, one light flickering every 10 seconds, and one light flashing every 10 seconds)
int Pin13 = 13;
int Pin12 = 12;
int Pin11 = 11;
// The setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output:
pinMode(Pin13, OUTPUT);
pinMode(Pin12, OUTPUT);
pinMode(Pin11, OUTPUT);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop(){
digitalWrite(Pin13, HIGH);
while (digitalRead (Pin13) == HIGH) {
digitalWrite(Pin12, HIGH);
delay(10000);
digitalWrite(Pin12, LOW);
delay(50);
digitalWrite(Pin12, HIGH);
delay(150);
digitalWrite(Pin12, LOW);
delay(200);
digitalWrite(Pin12, HIGH);
delay(200);
digitalWrite(Pin11, HIGH);
delay(500);
digitalWrite(Pin11, LOW);
}
}