circuitsalot
Tuesday, January 7, 2020
Example Blog Post: LED Sequence
I created a circuit for sequencing LEDs, controlled by an Arduino.
The circuit looks like this:
The code that sequences the blinks is here:
// Bryan Cera's LED Sequence Code int count; void setup() { // initialize digital pin 13 as an output. pinMode(6, OUTPUT); pinMode(7, OUTPUT); count = 0; } // the loop function runs over and over again forever void loop() { //turn 6 on, 7 off digitalWrite(6, HIGH); digitalWrite(7, LOW); //wait 500 ms delay(500); //turn 6 off, 7 on digitalWrite(6, LOW); digitalWrite(7, HIGH); //wait 500 ms delay(500); digitalWrite(6, HIGH); digitalWrite(7, LOW); delay(100); digitalWrite(6, LOW); digitalWrite(7, HIGH); delay(500); digitalWrite(6, LOW); digitalWrite(7, LOW); }
A video of the working sequence:
Stay tuned for more next week!
Kbye.
Home
Subscribe to:
Posts (Atom)