Closed tyeth closed 2 months ago
Added PR #610 to test the change
@tyeth another forum user is having issues with analog read on pico w - https://forums.adafruit.com/viewtopic.php?t=212531
Closing this as appears to have been solved and released. Feel free to reopen or create a new issue if this still affects you
A user reported to IO Support that their values for a 2.25v source on any analog input pin on the pico was minimal / unexpectedly small (0.3v).
Testing locally I see a value between 2 and 1023 being detected, and then scaled incorrectly. It returns 0.00 to 0.05.
Changing these lines to include setting a native resolution and scaleAnalogRead here appears to fix the issue (now 2 represents 0.006v and 1023 = 3.287v): src/components/analogIO/Wippersnapper_AnalogIO.cpp#L84
I added to this if block along with a load of logging in branch https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/tree/analogIO-scaling-picow:
Tagging @brentru who has more of a grasp on this.
Also worth of note is the possibly related older issue #403