analogReference(INTERNAL);
analogReadResolution(16);
analogReadAveraging(32);
float c;
int a;
a = analogRead(70); // k66 70
c = -0.00825*a +351.15; // calibrate to determine coefficients
Note the teensy's have an internal ADC register that returns chip temperature. For T3.6 it's analogRead(70). you may need to calibrate to convert ADC output to degrees C.
void showTemp() {
static bool once=0; // Could be done 'once' in setup() - or something like this perhaps
if ( !once ) {
once = true;
analogReference(INTERNAL);
analogReadResolution(16);
analogReadAveraging(32);
}
float c;
int a;
a = analogRead(70); // k66 70
c = -0.00825*a +351.15; // calibrate to determine coefficients
Serial.print(" Temp [av=");
Serial.print(a);
Serial.print("] >> °C=");
Serial.print(c);
Serial.print(", °F=");
Serial.println((c*1.8)+32);
}
millis() = 118005 Temp [av=37414] >> °C=42.48, °F=108.47
119005 Temp [av=37559] >> °C=41.29, °F=106.32
120005 Temp [av=37660] >> °C=40.45, °F=104.82
121005 Temp [av=37710] >> °C=40.04, °F=104.08
122005 Temp [av=37738] >> °C=39.81, °F=103.66
123005 Temp [av=37757] >> °C=39.65, °F=103.38
anyone have a good stress test program?
No.Should I be concerned about maybe damaging the MCU when running at 240 MHz? I measured up to 103 °F (in a pretty warm room).
I dont't know. But it has an internal temperature sensor to measure the temperature.Is it required to have an eye on the temp or is there any internal protection like a shut down mechanism?