- Code: Select all | TOGGLE FULL SIZE
Adafruit CircuitPython 6.2.0-beta.2-18-g2a467f137 on 2021-02-15; Raspberry Pi Pico with rp2040
>>> import microcontroller
>>> microcontroller.cpu[0].temperature
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'Processor' object is not subscriptable
>>> microcontroller.cpu.temperature
17.7757
>>> microcontroller.cpu.temperature
16.8394
>>> microcontroller.cpu.temperature ### about 40 seconds after power up
16.8394
>>> import time
>>> time.monotonic(), microcontroller.cpu.temperature
(56.952, 17.7757)
>>> time.monotonic(), microcontroller.cpu.temperature
(122.795, 16.3713)
>>> time.monotonic(), microcontroller.cpu.temperature
(265.187, 16.8394)
>>> time.monotonic(), microcontroller.cpu.temperature
(506.878, 15.435)
I ran a CircuitPython program for four minutes which did a bit of PWM, not sure if this made any difference.
- Code: Select all | TOGGLE FULL SIZE
>>> time.monotonic(), microcontroller.cpu.temperature
(746.805, 17.3076)
This is very wrong as one would expect the self-heating to take this above room temperature. For comparison, the nRF52840 equivalent looks really close to other temperature sensors on-board, see the graphs for nRF52840 CLUE. BTW, I noticed someone else has some magic constants for measuring temperature on the Pi Pico: https://github.com/geerlingguy/baby-saf ... -780556576