From 9a6a305fc5959d56d726d726892a6889300ea9c5 Mon Sep 17 00:00:00 2001 From: travis-farmer Date: Fri, 10 Nov 2023 14:24:14 -0500 Subject: [PATCH] so far, 8 good signals, one (tested) is DC --- DCCTimerGiga.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DCCTimerGiga.cpp b/DCCTimerGiga.cpp index 9763878..598c419 100644 --- a/DCCTimerGiga.cpp +++ b/DCCTimerGiga.cpp @@ -152,11 +152,11 @@ AdvancedADC adc; pin_size_t active_pins[] = {A0, A1, A2, A3}; pin_size_t active_pinsB[] = {A4, A5, A6, A7}; int num_active_pins = 4; -const int samples_per_round = 3; +const int samples_per_round = 512; int ADCee::init(uint8_t pin) { adc.stop(); - if (pin >= A0 && pin <= A3) adc.begin(AN_RESOLUTION_16, 2, 1, samples_per_round, num_active_pins, active_pins); - else if (pin >= A4 && pin <= A7) adc.begin(AN_RESOLUTION_16, 2, 1, samples_per_round, num_active_pins, active_pinsB); + if (pin >= A0 && pin <= A3) adc.begin(AN_RESOLUTION_10, 16000, 1, samples_per_round, num_active_pins, active_pins); + else if (pin >= A4 && pin <= A7) adc.begin(AN_RESOLUTION_10, 16000, 1, samples_per_round, num_active_pins, active_pinsB); return 123; }