From 872ee873b6560436b8884515fb0d452b8c0b8d6f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 May 2024 23:16:20 -0400 Subject: [PATCH] Update main.c move raw_adc --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 77e0f0c7..3815b281 100644 --- a/main.c +++ b/main.c @@ -2193,6 +2193,7 @@ void read_adc() int i = 0; time_start = (long int) micros(); //millis(); + int raw_adc; while (i++ < 10) { // Read 1 byte of data @@ -2204,7 +2205,7 @@ void read_adc() else { // Convert the data - int raw_adc = data[0]; + raw_adc = data[0]; // Output data to screen // printf("Digital value of analog input: %d in %d us\n", raw_adc, micros() - time_start); // millis() - time_start);