diff --git a/firmware/apps/blinker.c b/firmware/apps/blinker.c index 40b323b..78f7e49 100644 --- a/firmware/apps/blinker.c +++ b/firmware/apps/blinker.c @@ -10,7 +10,19 @@ static void init(void) { static void blinker(void) { led_inv(RIGHT); led_inv(LEFT); - wait_ms(500); + + uint8_t i; + for(i = 0; i < 50; ++i) { + if(button_clicked(RIGHT)) { + motor_on(); + } + + if(button_clicked(LEFT)) { + motor_off(); + } + + wait_ms(10); + } } REGISTER(blinker, init, NULL); diff --git a/firmware/apps/buggy.c b/firmware/apps/buggy.c index 9149aec..aa2b348 100644 --- a/firmware/apps/buggy.c +++ b/firmware/apps/buggy.c @@ -4,6 +4,7 @@ #include #include #include +#include inline uint16_t biased_random(uint8_t value) { return value / 4 * (rand() & 7);