adding Arduino code
This commit is contained in:
parent
97b4eef5ab
commit
21c3f2bb9d
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue