====== ntcReadf() ====== ''ntcReadf()'' returns the temperature of an NTC 3950 10kΩ sensor as a floating-point value in ℃. {{:en-us_commands:reference:ntcreadf.svg?900|ntcReadf command operation flow}} ''float ntcReadf(uint8_t ch)'' ===== Commands ===== ^ Command ^ Arguments ^ Return Value ^ Operation ^ | ''ntcReadf(ch)'' | ''uint8_t ch'' — MPINO: analog pin number; MPAINO: overall analog input channel number | ''float'' | Returns the temperature of an NTC 3950 10kΩ sensor as a floating-point value in ℃. | ===== 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 float temperature = ntcReadf(0); // Read the 10kΩ NTC temperature as degrees Celsius. Serial.print(F("Temperature: ")); Serial.println(temperature, 1); delay(500); } ===== Precautions ===== * ''ntcRead()'' is based on an NTC 3950, 10kΩ at 25 C sensor. * ''ntcReadf()'' divides the ''ntcRead()'' result by ''10.0F'', so its resolution remains ''0.1 C''. * Connecting a sensor with a different B value, reference resistance or wiring configuration causes temperature errors. * 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. ===== 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]]