#ifndef F_CPU #define F_CPU 16000000UL // telling controller crystal frequency (16 MHz AVR ATMega328P) #endif #include //header to enable data flow control over pins. Defines pins, ports, etc. #include //header to enable delay function in program #define BUTTON1 1 // button switch connected to port B pin 1 #define LED1 0 // Led1 connected to port B pin 0 #define LED2 1 // Led2 connected to port C pin 1 #define LED3 2 // Led3 connected to port D pin 2 #define DEBOUNCE_TIME 25 // time to wait while "de-bouncing" button #define LOCK_INPUT_TIME 300 // time to wait after a button press void init_ports_mcu() { DDRB=0xFFu; // Set all pins of the PORTB as output. DDRB &= ~(1<