View Source onewire_ds18b20 (grisp v2.8.0)
Communicate with the DS18B20 - Programmable Resolution 1-Wire Digital Thermometer
Summary
Functions
Initiate a temperature measurement.
Read the scratchpad.
Read the temperature in °C from the scratchpad.
Functions
Initiate a temperature measurement.
Example
1> onewire_ds18b20:convert([40,255,190,25,96,23,3,203], 500).
ok
Read the scratchpad.
Returns the two bytes of the temperature register (LSB
and MSB
) and
the one byte of the configuration register.
Read the temperature in °C from the scratchpad.
Example
onewire_ds18b20:temp([40,255,190,25,96,23,3,203]).
22.375