#include int main(void) { ddrb = ddrb & ~(1<<7); while (1) { if(pinb & (1<<7)) ddrb = ddrb & ~(1<<4); else ddrb = ddrb | (1<<4); } return 0; }