int vhod;
void setup() {
Serial.begin(115200);
DDRD |= 0b00000000;
}
void loop() {
vhod = PIND & 0b11100000;
switch(vhod){
case 0b10000000:{
Serial.println("Pritisnjena je tipka RED");
break;
}
case 0b01000000: {
Serial.println("Pritisnjena je tipka GREEN");
break;
}
case 0b00100000:{
Serial.println("Pritisnjena je tipka BLUE");
}
}
delay(50);
}