#include #include #include #include #include #define LED_L (1 << PORTC0) #define LED_R (1 << PORTC2) #define MOTOR_ON (0< 3) mode =3; flashleds(LED_L); break; case 0b00000001: //right switch pressed mode++; if (mode > 3) mode = 0; flashleds(LED_R); break; case 0b00000000: //both switches pressed flashleds(LED_R|LED_L); break; } } /* never return 0; */ return 0; }