Hello, I am programming the Baby O, trying to read a port connected to a pushbutton and light the LED. Why is this code not working?
Thanks for all help and comments!
int main(void) {
DDRD |= 1<<PD1; // set PD1 to output
while(1){
if bit_is_set(PORTB,PB3){
PORTD |= 1<<PD1; // LED on
}
}
return 0;
}