User Tools

Site Tools


en-us_commands:reference:ntcreadf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en-us_commands:reference:ntcreadf [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1en-us_commands:reference:ntcreadf [2026/09/14 20:30] (current) – external edit 127.0.0.1
Line 14: Line 14:
  
 ===== Example ===== ===== Example =====
 +
 +Connect an X input module to MPAINO-8A8R(T) and select **Analog Input Module → X**. Set CH0 DIP switches NTC and GND to ON, then connect the 10kΩ NTC sensor.
  
 <code cpp> <code cpp>
Line 21: Line 23:
  
 void loop() { void loop() {
-  int temp10 = ntcRead(0); +  const float temperature = ntcReadf(0);  // Read the 10kΩ NTC temperature as degrees Celsius. 
-  float tempC = ntcReadf(0); +  Serial.print(F("Temperature: ")); 
- +  Serial.println(temperature, 1);
-  Serial.print("NTC = "); +
-  Serial.print(tempC, 1); +
-  Serial.println(" C");+
   delay(500);   delay(500);
 } }
Line 38: Line 37:
   * On MPAINO, the temperature is incorrect unless the DIP switch is in NTC mode.   * On MPAINO, the temperature is incorrect unless the DIP switch is in NTC mode.
   * On MPAINO, the first call internally initializes only the corresponding analog input module.   * On MPAINO, the first call internally initializes only the corresponding analog input module.
 +
 +===== Built-in Commands in the Same Category =====
 +
 +  * [[:en-us_commands:reference:ntcread|ntcRead() View detailed description]]
 +  * [[:en-us_commands:reference:pt100read|pt100Read() View detailed description]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/ntcreadf.1788785569.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki