We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5990002 commit f3da8fbCopy full SHA for f3da8fb
src/components/analogIO/Wippersnapper_AnalogIO.cpp
@@ -232,8 +232,12 @@ uint16_t Wippersnapper_AnalogIO::getPinValue(int pin) {
232
*/
233
/**********************************************************/
234
float Wippersnapper_AnalogIO::getPinValueVolts(int pin) {
235
+#ifdef ARDUINO_ARCH_ESP32
236
+ return analogReadMilliVolts(pin) / 1000.0;
237
+#else
238
uint16_t rawValue = getPinValue(pin);
239
return rawValue * getAref() / 65536;
240
+#endif
241
}
242
243
/******************************************************************/
0 commit comments