File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,12 @@ void Wippersnapper_AnalogIO::setADCResolution(int resolution) {
8989#elif defined(ARDUINO_ARCH_ESP32)
9090 scaleAnalogRead = true ;
9191 _nativeResolution = 13 ;
92+ #elif defined(ARDUINO_ARCH_RP2040)
93+ scaleAnalogRead = true ;
94+ _nativeResolution = 10 ;
95+ #else
96+ scaleAnalogRead = true ;
97+ _nativeResolution = 10 ;
9298#endif
9399
94100 _adcResolution = resolution;
@@ -205,7 +211,6 @@ void Wippersnapper_AnalogIO::deinitAnalogPin(
205211uint16_t Wippersnapper_AnalogIO::getPinValue (int pin) {
206212 // get pin value
207213 uint16_t value = analogRead (pin);
208-
209214 // scale by the ADC resolution manually if not implemented by BSP
210215 if (scaleAnalogRead) {
211216 if (getADCresolution () > getNativeResolution ()) {
You can’t perform that action at this time.
0 commit comments