Ausgabe Pin hizugefügt

Damit die Bord LED auch das Signal anzeigt
This commit is contained in:
Hartmut Buschke 2024-11-06 18:04:27 +01:00
parent c65ef38b9c
commit a733c347b6

View File

@ -7,13 +7,16 @@
#define outPin 16 // D0
#define ledPin 2 // D4
byte selectBit;
int timeBit[59] = {0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 2};
void setup() {
pinMode(outPin, OUTPUT);
pinMode(ledPin, OUTPUT);
digitalWrite(outPin, LOW);
digitalWrite(ledPin, HIGH);
}
void loop() {
@ -32,29 +35,37 @@ void loop() {
switch (selectBit) {
case 0:
digitalWrite(outPin, HIGH);
digitalWrite(ledPin, LOW);
delay(100);
digitalWrite(outPin, LOW);
digitalWrite(ledPin, HIGH);
delay(900);
break;
case 1:
digitalWrite(outPin, HIGH);
digitalWrite(ledPin, LOW);
delay(200);
digitalWrite(outPin, LOW);
digitalWrite(ledPin, HIGH);
delay(800);
break;
case 2:
digitalWrite(outPin, HIGH);
digitalWrite(ledPin, LOW);
delay(100);
digitalWrite(outPin, LOW);
digitalWrite(ledPin, HIGH);
delay(1900);
break;
case 3:
digitalWrite(outPin, HIGH);
digitalWrite(ledPin, LOW);
delay(200);
digitalWrite(outPin, LOW);
digitalWrite(ledPin, HIGH);
delay(1800);
break;
}