2 * Asking Riddles at the Entrance to Garage
4 * (c) 2017 Martin Mares <mj@ucw.cz>
8 * Pin assignment (component side view; "*" marks inverted signals)
10 * +-------------------+
14 * | GND PB0=MOSI | diagnostic LED*
15 * +-------------------+
18 #define F_CPU 1200000UL
21 #include <avr/sleep.h>
22 #include <util/delay.h>
26 #define B(x) (1U<<(x))
28 static void sleep(uint16_t millisec)
38 DDRB |= B(PB0); // PB0: output
39 DDRB |= B(PB4); // PB4: output
40 PORTB &= ~B(PB3); // PB3: input, no pullup
42 for (byte i=0; i<5; i++) {
61 set_sleep_mode(SLEEP_MODE_PWR_DOWN);