1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#include <avr/io.h> #include <util/delay.h> int main(void) { /* PB4 output */ DDRB |= _BV(4); PORTB &= ~_BV(4); //for (;;) //{ // _delay_ms(1000); // PORTB ^= _BV(4); //} // wait for 45s and enable the amplifier for (uint8_t i = 0; i < 32; ++i) { _delay_ms(1000); } PORTB |= _BV(4); return 0; }