Table of Contents

ntcRead()

ntcRead() returns the temperature of an NTC 3950 10kΩ sensor as an integer in 0.1℃ units.

ntcRead command operation flow

int ntcRead(uint8_t ch)

Commands

Command Arguments Return Value Operation
ntcRead(ch) uint8_t ch — MPINO: analog pin number; MPAINO: overall analog input channel number int Returns the temperature of an NTC 3950 10kΩ sensor as an integer in 0.1℃ units.

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.

void setup() {
  Serial.begin(115200);
}
 
void loop() {
  const int temperature10 = ntcRead(0);  // Read the 10kΩ NTC temperature as tenths of a degree Celsius.
  Serial.print(F("Temperature: "));
  Serial.println(temperature10 / 10.0F, 1);
  delay(500);
}

Precautions

Built-in Commands in the Same Category

← Built-in Command List