For Arduino ant STM32 boards.
The Library implements a set of methods for working with a NTC thermistor. Provides a temperature reading in Celsius, Fahrenheit and Kelvin.
- Download the Latest release from gitHub.
- Unzip and modify the Folder name to "NTC_Thermistor" (Remove the '-version')
- Paste the modified folder on your Library folder (On your
libraries
folder inside Sketchbooks or Arduino software). - Restart the Arduino IDE.
!!! Помилка!!! R0 на 3,3 вольта, а не на 5 !!!
Connect to the analog side of an Arduino Uno. Run GND through the thermistor, then a pull-down resistor (R0), and into 3.3V. To measure the temperature pull a line off the junction of the thermistor and the resistor, and into an analog pin (A1 here).
// Instantiation:
/**
pin - an analog port number to be attached to the thermistor.
R0 - reference resistance.
Rn - nominal resistance.
Tn - nominal temperature in Celsius.
B - b-value of a thermistor.
*/
NTC_Thermistor thermistor(pin, R0, Rn, Tn, B);
// Read a temperature in Celsius.
double celsius = thermistor.readCelsius();
// Read a temperature in Kelvin.
double Kelvin = thermistor.readKelvin();
// Read a temperature in Fahrenheit.
double fahrenheit = thermistor.readFahrenheit();
// For older devices.
double farenheit = thermistor.readFarenheit();