I want to find...

検索

Shares

Table of Content

cpuTemperature()

[Analog I/O]

説明

Read the temperature of the 86Duino’s CPU. This function is available from 86Duino Coding 102.

構文

cpuTemperature(mode)
cpuTemperature()

媒介変数

modeDEGREE_C to read the temperature in celsius (°C), or DEGREE_F to read the temperature in fahrenheit (°F). The default is DEGREE_C.

戻り値

the CPU temperature (double)

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

86Duino のリファレンスのテキストは Arduino レファレンス を編集したもので、 Creative Commons Attribution-ShareAlike 3.0 License下でライセンスされています。リファレンス内のコードサンプルはパブリックドメインとして公開されています。

上部へスクロール