void setup() {
// put your setup code here, to run once:
DDRD = 0b11111111;
PORTD = 0b00000100;
}
void loop() {
// put your main code here, to run repeatedly:
bool but = PIND & 0b00000100;
if(but = 0){
PORTD |= 0b10000100;
}
else {
PORTD &= 0b11111111;
}
}