void setup() {
// put your setup code here, to run once:
DDRC &= 0b11111000;
PORTC |= 0b00000111; // A0-A2 as PullUp
// pinMode(A0, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
if((PINC & 0b00000001) == 0) { // Test bit 0 only
PORTB |= 0b00100000; // BUILTIN_LED pin 13 On
} else {
PORTB &= ~0b00100000; // BUILTIN_LED pin 13 Off
}
/* or this way
if(PINC & 0b00000001) { // Test bit 0 only
PORTB &= ~0b00100000; // BUILTIN_LED pin 13 Off
} else {
PORTB |= 0b00100000; // BUILTIN_LED pin 13 On
}
*/
}