adding Arduino code

This commit is contained in:
John 2021-03-27 12:09:21 -04:00
parent 97b4eef5ab
commit 21c3f2bb9d
1 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,19 @@
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);
}
}