pimoroni-pico
pimoroni-pico copied to clipboard
Examples: Update ADC()
trafficstars
Should help with #965
I've not done anything with our Analog class in modules_py/pimoroni.py here, which might also need looking at?
Thank you!
I guess in Analog it should be something like:
self.pin = ADC(pin) if isinstance(pin, Pin) else ADC(Pin(pin))
Looks like it's never actually called with a Pin instance, but it should probably handle that just in case.
I think this has been rendered redundant by https://github.com/micropython/micropython/commit/2b8de7436bbdb54da99bf6bdb79359876fd3bc1d
Edit: Or rather, will be, as you correctly point out in #959 - when MicroPython 1.24.x is released 🤔