pimoroni / pimoroni-pico-rp2350

MicroPython builds for Pimoroni Pico 2 / RP2350 boards.
37 stars 6 forks source link

Pico Plus 2: Internal Temperature #6

Closed Macrosii closed 2 months ago

Macrosii commented 2 months ago

Hi I think the Pico Plus 2 uses the QFN-80 chip. For this chip the ADC is on the ninth ADC channel (AINSEL=8). Micropython reports _"ValueError: Pin doesn't have ADC capabilities", for code _sensortemp = machine.ADC(8)

Regards

Gadgetoid commented 2 months ago

Tested on my Pico Plus 2 and seems fine"

>>> from machine import ADC
>>> ADC.CORE_TEMP
8
>>> ADC(ADC.CORE_TEMP)
<ADC channel=8>

Do you have a recent build of MicroPython? It's still a work in progress and things are changing quickly: https://github.com/micropython/micropython/pull/15619

Macrosii commented 2 months ago

Hi Gagetoid

I am using the "pico_plus2_rp2350_psram" image found here so that I have PSRAM and the Pimoroni libs! Regards

Macrosii commented 2 months ago

OH, ok missed that updated 6 mins ago

Gadgetoid commented 2 months ago

To be fair I just checked the releases after replying here (I've been using various CI builds from whatever bug or feature I'm working on) and realised there hadn't been one for three weeks 😬 , so I tagged one just now 😆

For anyone else who might end up here: https://github.com/pimoroni/pimoroni-pico-rp2350/releases/tag/v0.0.6

Macrosii commented 2 months ago

Yep that did it. Many , many thanks