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) {
89
89
#elif defined(ARDUINO_ARCH_ESP32)
90
90
scaleAnalogRead = true ;
91
91
_nativeResolution = 13 ;
92
+ #elif defined(ARDUINO_ARCH_RP2040)
93
+ scaleAnalogRead = true ;
94
+ _nativeResolution = 10 ;
95
+ #else
96
+ scaleAnalogRead = true ;
97
+ _nativeResolution = 10 ;
92
98
#endif
93
99
94
100
_adcResolution = resolution;
@@ -205,7 +211,6 @@ void Wippersnapper_AnalogIO::deinitAnalogPin(
205
211
uint16_t Wippersnapper_AnalogIO::getPinValue (int pin) {
206
212
// get pin value
207
213
uint16_t value = analogRead (pin);
208
-
209
214
// scale by the ADC resolution manually if not implemented by BSP
210
215
if (scaleAnalogRead) {
211
216
if (getADCresolution () > getNativeResolution ()) {
You can’t perform that action at this time.
0 commit comments