예제 #1
0
int main(void)
{
	RLY_DDR = _BV(RLY_BIT);
	PWR_BTN_PORT |= _BV(PWR_BTN_BIT);

	for (;;) {
		if (button_is_pressed()) {
			toggle_relay();
			_delay_ms(500);
		}
	}
}
예제 #2
0
void button1_toggled() {
	toggle_relay();
}