From eb0a53092d9981e121f0ba5a97ffe27d77aa4a74 Mon Sep 17 00:00:00 2001 From: bigalex Date: Mon, 8 Oct 2012 21:47:43 +0200 Subject: [PATCH] measuring with adcbut 10ms is not fast enough --- firmware/main.c | 79 ++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/firmware/main.c b/firmware/main.c index 755ff58..8b48ed5 100644 --- a/firmware/main.c +++ b/firmware/main.c @@ -292,6 +292,7 @@ void do_mode4(void) { ; void do_mode5(void) { + static bool sample; static timer_t mytimer; uint16_t led1; uint16_t led2; @@ -299,50 +300,46 @@ void do_mode5(void) { if (ModeChanged) { //init after mode change ModeChanged = false; + ADMUX = (1<