Skip to content

ZakKemble/LM73

Repository files navigation

LM73 Temperature Sensor Library

TI LM73 Temperature sensor IC library for Arduino.

Installing

Search for "LM73" in the Arduino library manager and check out some of the examples!

Docs

Method Parameters Returns Description
LM73(
TwoWire& wire
)
wire:
I2C interface to use.
Valid values: Wire, Wire1, Wire2 ... etc.
Instance of LM73 Constructor.
begin(
uint8_t address
)
address:
Sensor I2C Address
Valid values: see table below
void Initializes instance.
ctrl(
uint8_t resolution,
bool busTimeout
)
resolution:
Temperature conversion resolution.
Lower resolution gives faster conversion times.
Valid values: 11, 12, 13 or 14
busTimeout:
This is an SMBus feature.
It's usually best to disable it (false) to reduce power consumption.
void Configure various parameters.
mode(
uint8_t mode
)
mode:
0 = Continuous (default)
1 = Low-power one-shot
void Set conversion mode.
read() - float: The temperature Reads the latest temperature conversion.
convert() - void Start a new one-shot conversion.
Has no effect in continuous mode.
available() - bool:
true: One-shot conversion complete.
false: Busy
-
alertStatus() - uint8_t:
Bitwise state and flags
Bit 7-4: N/A
Bit 3: Alert status
Bit 2: High flag
Bit 1: Low flag
Bit 0: N/A
Reads alarm status and high/low temperature flags.
See datasheet for more info.
alertReset() - void Clear alarm output.
alertConfig(
bool enable,
uint8_t polarity,
float upperLimit,
float lowerLimit
)
enable:
Enable alarm output.
polarity:
0 = Active low (default).
1 = Active high.
upperLimit:
Alarm trigger level.
lowerLimit:
Alarm clear level.
void -

Device I2C Addresses

The I2C address of the sensor IC will depend on whether it's an -0 or -1 type and the state of its address pin.

Address pin LM73-0 LM73-1
Float 0x48 0x4C
Ground 0x49 0x4D
VDD 0x4A 0x4E

About

LM73 Temperature Sensor Library

Topics

Resources

License

Stars

Watchers

Forks

Contributors