Playground Temperature

But wait! There's more -- the Circuit Playground Express can also tell the temperature!

How, you ask? With a build in thermistor. This little sensor is a thermally sensitive resistor, meaning it's resistance changes based on temperature.

We can access its readings in CircuitPython by importing the adafruit_thermistor library, and then using the board.TEMPERATURE pin to read the thermistor value.

Copy the code below in to a new file, then save it onto the board as Then, open up a REPL session and you'll see the temperature readings in both Celsius and Fahrenheit. 

# CircuitPlaygroundExpress_Temperature
# reads the on-board temperature sensor and prints the value

import adafruit_thermistor
import board
import time

thermistor = adafruit_thermistor.Thermistor(board.TEMPERATURE, 10000, 10000, 25, 3950)

while True:
    print("Temperature is: %f C and %f F" % (thermistor.temperature,


Try placing your finger over the sensor (you'll see a thermometer icon on the board) and watch the readings change.

Last updated on 2018-04-24 at 02.49.19 PM Published on 2017-10-12 at 10.43.39 PM