You can sense the temperature using the onboard thermistor. A thermistor is a resistor that changes it's resistance based on the temperature. They are a little more complex to use than temperature sensors that spit out Celsius, but they're also much less expensive.

We use the NTC thermistor (Murata NCP15XH103F03RC) for temperature sensing. While it isn't an all-in-one temperature sensor, with linear output, it's easy to calculate the temperature based on the analog voltage on analog pin #A0. There's a 10K 1% resistor connected to it as a pull down. You can read the analog value and calculate the temperature with the beta-constant, or just use the Circuit Playground library

Library Reference

You can retreive the current calculated temperature with CircuitPlayground.temperature() which will return you a floating point number in Centigrade. If you need Fahrenheit use CircuitPlayground.temperatureF()

This guide was first published on Jul 19, 2016. It was last updated on Mar 08, 2024.

This page (Temperature Sensor) was last updated on Jul 15, 2016.

Text editor powered by tinymce.