/* A simple on/off button code for Tiny44 Button connected to PB0 LED connected to PB2 Program written by Andrew Kriebel to demonstrate the LED on/off by push button. modified by Tejswini Chaudhari for her pins. */ #include int main(void) { PORTB = 0b00001000; // register PORTB high. DDRB = 0b10000000; // high. while (1) { if ((PINB & 0b00001000) == 0 ) { PORTB = 0b10000000; } else { PORTB = 0b00000000; } } return (0); }