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

Both sides previous revisionPrevious revision
en-us_commands:reference:ntcreadf [2026/09/08 00:53] – 바깥 편집 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);  // Return the NTC 3950 10kΩ sensor temperature as an integer in 0.1°C units. +  const float temperature = ntcReadf(0);  // Read the 10kΩ NTC temperature as degrees 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(temperature, 1);
-  Serial.print("NTC = "); +
-  Serial.print(tempC, 1); +
-  Serial.println(" C");+
   delay(500);   delay(500);
 } }
en-us_commands/reference/ntcreadf.1788796404.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki