This repository has been archived on 2024-03-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
BlinkyLightThing/blinky_program/blinky_program.ino

19 lines
485 B
Arduino
Raw Permalink Normal View History

2021-03-27 12:09:21 -04:00
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(13, OUTPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
delay(50); // milliseconds
int LED_pin = 13;
for (int LED_pin = 13; LED_pin >=9; LED_pin--) {
if (random(0, 4) >= 3) digitalWrite(LED_pin, HIGH); else digitalWrite(LED_pin, LOW);
//digitalWrite(LED_pin, HIGH);
}
}