[Analog I/O]
Description
Read the temperature of the 86Duino’s CPU. This function is available from 86Duino Coding 102.
Syntax
cpuTemperature(mode) cpuTemperature()
Parameters
mode
: DEGREE_C
to read the temperature in celsius (°C), or DEGREE_F
to read the temperature in fahrenheit (°F). The default is DEGREE_C
.
Returns
the CPU temperature (double)
Example Code
double val1 = 0.0; double val2 = 0.0; void setup() { Serial.begin(9600); } void loop() { val1 = cpuTemperature(DEGREE_C); val2 = cpuTemperature(DEGREE_F); Serial.print(val1); Serial.print(" "); Serial.println(val2); delay(100); }
Language Reference Home
The text of the 86Duino reference is a modification of the Arduino reference and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.