Zalohy z 24. schuzky.

This commit is contained in:
vojta@ernie
2026-04-21 22:12:48 +02:00
parent 518a80f674
commit 0072ff5720
12 changed files with 32 additions and 2 deletions
@@ -0,0 +1,30 @@
int pinG = 13;
int pinY = 12;
int pinR = 11;
int pinB = 2;
int hodnota = HIGH;
const OFF = HIGH;
const ON = LOW;
void setup() {
pinMode (pinG, OUTPUT);
pinMode (pinY, OUTPUT);
pinMode (pinR, OUTPUT);
pinMode (pinB, INPUT);
Serial.begin(9600);
}
void loop(){
hodnota = digitalRead(pinB);
Serial.println(hodnota);
if (hodnota == ON){
digitalWrite(pinG, HIGH);
delay(500);
}
}