anchor.diff: +%% -----------------------------------------------------------------------------
  +%% @doc Communicate with the
  +%% <a href="https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf">
  +%% DS18B20 - Programmable Resolution 1-Wire Digital Thermometer
  +%% </a>.
  +%% @end
  +%% -----------------------------------------------------------------------------
   -module(onewire_ds18b20).
  -% Device: DS18B20 - Programmable Resolution 1-Wire Digital Thermometer
  -% https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf
   
   % API
   -export([temp/1]).
  
positive.code: 
  %--- API -----------------------------------------------------------------------
  
  temp(ID) ->
      grisp_onewire:transaction(fun() ->
          select_device(ID),
  
negative.code:     case ms() - Start > Timeout of
          false ->
              timer:sleep(10),
              confirm(grisp_onewire:read_byte(), Start, Timeout);
          true ->
              error({onewire_ds18b20, confirmation_timeout})
      end;
  