File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -87,16 +87,15 @@ void Wippersnapper_AnalogIO::setADCResolution(int resolution) {
8787 analogReadResolution (16 );
8888 _nativeResolution = 12 ;
8989#elif defined(ARDUINO_ARCH_ESP32)
90- scaleAnalogRead = true ;
91- _nativeResolution = 13 ;
90+ scaleAnalogRead = false ; // handled in bsp
91+ _nativeResolution = 13 ; // S3 ADC is 13-bit, others are 12-bit
9292#elif defined(ARDUINO_ARCH_RP2040)
9393 scaleAnalogRead = true ;
9494 _nativeResolution = 10 ;
9595#else
9696 scaleAnalogRead = true ;
9797 _nativeResolution = 10 ;
9898#endif
99-
10099 _adcResolution = resolution;
101100}
102101
@@ -233,8 +232,10 @@ uint16_t Wippersnapper_AnalogIO::getPinValue(int pin) {
233232/* *********************************************************/
234233float Wippersnapper_AnalogIO::getPinValueVolts (int pin) {
235234#ifdef ARDUINO_ARCH_ESP32
235+ WS_DEBUG_PRINTLN (" ESP32: Using analogReadMilliVolts()" );
236236 return analogReadMilliVolts (pin) / 1000.0 ;
237237#else
238+ WS_DEBUG_PRINTLN (" Using old getPinValueVolts()" );
238239 uint16_t rawValue = getPinValue (pin);
239240 return rawValue * getAref () / 65536 ;
240241#endif
You can’t perform that action at this time.
0 commit comments