From e0b2f5061de777f4b00ac13bfe52abc25884ddf0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 23 May 2024 09:48:24 -0400 Subject: [PATCH] Update main.c adc_buffer --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 81ee4ccc..36e73d56 100644 --- a/main.c +++ b/main.c @@ -2277,7 +2277,7 @@ void read_adc_process(int sig_num) if (wav_position > (BUFFER_SIZE - 1)) { // set pwm level // allow the pwm value to repeat for 8 cycles this is >>3 - buffer[wav_position] = 0; + adc_buffer[wav_position] = 0; if(read(adc_file, data, 1) != 1) { fprintf(stderr,"Erorr: ADC Input/output Erorr \n"); @@ -2285,7 +2285,7 @@ void read_adc_process(int sig_num) else { // Convert the data - buffer[wav_position] = data[0]; + adc_buffer[wav_position] = data[0]; // Output data to screen // printf("Digital value of analog input: %d in %d us\n", data[0], micros() - time_start); // millis() - time_start);