CircuitPython CPU Temp

This little built in sensor comes with all ATSAMD21 chips, and its really nice to have a temperature sensor so we let you read it via CircuitPython, its new since 2.0.0 and only available on the ATSAMD21-based boards (e.g. not ESP8266)

It's so easy, we'll just give you the two REPL commands

>>> import microcontroller
>>> microcontroller.cpu.temperature

That's it! You'll have the temperature in Centigrade printed out. Note it is not exactly the same as ambient temperature, and its not super precise. But it's kinda close!

Last updated on 2018-01-12 at 06.48.58 PM Published on 2017-10-12 at 10.43.39 PM