#include #include #include #include uint8_t buffer[70], idx=0; #define EINGANG 0x01 #define AUSGANG 0x02 #define TOGGLE 0x04 int main(void) { MCUSR = 0; PORTB = 0b0001; // PB2=toggle, PB1=Ausgang, PB0=Eingang mit Pullup DDRB = 0b1110; wdt_enable(WDTO_15MS); WDTCR |= 1<= sizeof(buffer)) idx = 0; sleep_cpu(); } } ISR(WDT_vect) { PORTB ^= TOGGLE; WDTCR |= 1<