Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


The Kinetis Cortex-M processor on the Teensy 3/LC boards has a built-in temperature sensor. This library provides functions to read the temperature in both Celsius and Fahrenheit.

The Teensy 4 has a built-in temperature sensor, along with built-in functions to read temperature. This library provides a wrapper around the built-in functions (to support common code for Teensy 3 and 4).

In addition, the library has high and low temperature alarm functions to perform actions when temperature limits are exceeded.

Examples are provided to show how to read temperatures, set alarms, and, for Teensy 4, change the CPU clock speed based on temperature.

Here is a simple example of how to read the temperature:

#include <InternalTemperature.h>

void setup()

void loop()
  float temp = InternalTemperature.readTemperatureC();

For more details and information on calibration, see