convert/2 | Initiate a temperature measurement. |
read_scratchpad/1 | Read the scratchpad. |
temp/1 | Read the temperature in °C from the scratchpad. |
convert(ID::[byte()], Timeout::any()) -> ok
Initiate a temperature measurement.
1> onewire_ds18b20:convert([40,255,190,25,96,23,3,203], 500). ok
read_scratchpad(ID::[byte()]) -> {LSB::binary(), MSB::binary(), Config::binary()}
Read the scratchpad.
Returns the two bytes of the temperature register (LSB
and MSB
) and
the one byte of the configuration register.
temp(ID::[byte()]) -> float()
Read the temperature in °C from the scratchpad.
onewire_ds18b20:temp([40,255,190,25,96,23,3,203]). 22.375
Generated by EDoc