en-us_commands:reference:ntcread
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_commands:reference:ntcread [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | en-us_commands:reference:ntcread [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 | + | |
| - | float tempC = ntcReadf(0); | + | Serial.print(F("Temperature: |
| - | + | Serial.println(temperature10 / 10.0F, 1); | |
| - | Serial.print(" | + | |
| - | Serial.print(tempC, 1); | + | |
| - | Serial.println(" | + | |
| delay(500); | delay(500); | ||
| } | } | ||
en-us_commands/reference/ntcread.1788796404.txt.gz · Last modified: by 127.0.0.1
