User Tools

Site Tools


en-us_commands:reference:ntcread

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en-us_commands:reference:ntcread [2026/09/08 00:53] – 바깥 편집 127.0.0.1en-us_commands:reference:ntcread [2026/10/25 08:41] (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);  // Return the NTC 3950 10kΩ sensor temperature as an integer in 0.1°C units. +  const int temperature10 = ntcRead(0);  // Read the 10kΩ NTC temperature as tenths of a degree Celsius. 
-  float tempC = ntcReadf(0);  // Return the NTC 3950 10kΩ sensor temperature as a floating-point value in °C. +  Serial.print(F("Temperature: ")); 
- +  Serial.println(temperature10 / 10.0F, 1);
-  Serial.print("NTC = "); +
-  Serial.print(tempC, 1); +
-  Serial.println(" C");+
   delay(500);   delay(500);
 } }
Line 41: Line 40:
 ===== Built-in Commands in the Same Category ===== ===== Built-in Commands in the Same Category =====
  
-  * [[:en-us_commands:reference:ntcreadf|ntcReadf() View detailed description]] +  * [[:en-us_commands:reference:ntcreadf|ntcReadf() reference]] 
-  * [[:en-us_commands:reference:pt100read|pt100Read() View detailed description]]+  * [[:en-us_commands:reference:pt100read|pt100Read() reference]]
  
 [[:en-us_commands:builtin|← Built-in Command List]] [[:en-us_commands:builtin|← Built-in Command List]]
  
en-us_commands/reference/ntcread.1788796404.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki