From e642a725d42ab9137d3c43adbb81d09b56f33319 Mon Sep 17 00:00:00 2001 From: bigalex Date: Mon, 1 Oct 2012 22:32:52 +0200 Subject: [PATCH] demo for direct switch testing, led and motor control --- firmware/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index b12161d..c883aa5 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -39,11 +39,9 @@ main(void) if (timer_expired(&t)){ if (switch_l()) {led_on(LED_L);} else {led_off(LED_L);}; if (switch_r()) {led_on(LED_R);} else {led_off(LED_R);}; - - timer_set(&t, 50); - + if (switch_l()&&switch_r()) {set_motor(MOTOR_ON);} else {set_motor(MOTOR_OFF);}; + timer_set(&t, 5); }; //end if timer expired - //USART0_put_uint16(0xA09F); //USART0_crlf();