BlinkenLights

description:
I tried making a few variations of light blinking on/off rhythms but the possibilities are endless, so I went with speeds/pause that had some contrast: 2 blips of 0.1 second, and a 1-second, followed by a 2 second pause.

 

components:

1 Arduino

1 LED

1 Resistor(220Ω)

1 Breadboard

code

void setup() {
// initialize digital pin 13 as an output.
pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for .1 second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for .1 second
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(100); // wait for .1 second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(100); // wait for .1 second
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(13, LOW); // turn the LED off by making the voltage LOW
delay(2000); // wait for 2 seconds
}

 

 

Leave a Reply