From 65364212ca55a5acfdeed85984518cd7b23452a3 Mon Sep 17 00:00:00 2001 From: pmantoine Date: Wed, 12 Oct 2022 17:30:20 +0800 Subject: [PATCH] SAMD21 fix analogresolution in ADCee::init --- DCCTimerSAMD.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DCCTimerSAMD.cpp b/DCCTimerSAMD.cpp index 4c04276..32e977f 100644 --- a/DCCTimerSAMD.cpp +++ b/DCCTimerSAMD.cpp @@ -164,7 +164,7 @@ int ADCee::init(uint8_t pin) { if (id > NUM_ADC_INPUTS) return -1023; -// pinMode(pin, INPUT); + analogReadResolution(12); // Consistent with settings in ADCee::begin below int value = analogRead(pin); if (analogvals == NULL) analogvals = (int *)calloc(NUM_ADC_INPUTS+1, sizeof(int));