Skip to content
Frank edited this page Mar 18, 2020 · 13 revisions

Teensy 3.x:

TBD

Teensy 4:

The Teensy 4 core has an inbuilt function:

extern float tempmonGetTemp(void);

void setup() {
  while (!Serial);
}

void loop() {
  Serial.print( tempmonGetTemp() );
  Serial.println("°C");
  delay(500);
}

Note: Temperature conversion formula from degree Celsius to Fahrenheit is given by F = (C * 9.0f / 5.0f) + 32.0f

Clone this wiki locally