Gallery Installation in Progress....

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);
digitalWrite(Pin12, LOW);
digitalWrite(Pin12, HIGH);
digitalWrite(Pin12, LOW);
digitalWrite(Pin12, HIGH);
digitalWrite(Pin11, HIGH);
digitalWrite(Pin11, LOW);

No comments: