The LM86 is an 11-bit digital temperature sensor with a 2-wire System Management Bus (SMBus) serial interface. The LM86 accurately measures its own temperature as well as the temperature of an external device, such as processor thermal diode or diode connected transistor such as the 2N3904
This library allows the user to read the local and remote temperature from a LM86 chip. Periodic conversion and oneshot mode are supported.
Examples are included to get you started.
- /examples - Example sketch for the library (.ino). Run these from the Arduino IDE.
- /src - Source files for the library (.cpp, .h).
- keywords.txt - Keywords from this library that will be highlighted in the Arduino IDE.
- library.properties - General library properties for the Arduino package manager.
The library enables the following functions:
bool begin(TwoWire &wirePort = Wire, ConvRate rate = ConvRate::CR_1Hz);
Initialize library and set conversion rate. Please call begin() sometime after initializing the I2C interface with Wire.begin().
bool oneshot(void);
Trigger one conversion and wait until it is done.
float getLocalTemperature(void);
float getRemoteTemperature(void);
Read temperature values. Returns -1000.0 in case of error.