anchor.diff:  
   % Private API
   
  -read_loop(Bytes) when byte_size(Bytes) < ?ACC ->
  -    % We need to sleep a little bit, otherwhise the VM cannot
  -    % switch task (on single core devices)!
  +read_loop(WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Msb) ->
       timer:sleep(?READ_TIMEOUT),
       case rs232:read(?READ_LENGTH, ?READ_TIMEOUT) of
           % Everything is fine
           {Error, [Byte]} when Error == 0 ->
  -            read_loop(<<Bytes/binary, Byte:8>>);
  +            {NewWaitForData, NewExecuteMultiByteCommand, NewMultiByteChannel, NewLsb, NewMsb} = parse_byte(Byte, WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Msb),
  +            read_loop(NewWaitForData, NewExecuteMultiByteCommand, NewMultiByteChannel, NewLsb, NewMsb);
            % Timeout: we shouldn't worry too much
           {Error, _} when Error == 9 ->
  -            read_loop(Bytes);
  +            read_loop(WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Msb);
           % Worry
           {Error, Other} ->
               io:format(standard_error, "Error while reading: ~w ~p~n", [Error, Other])
  -    end;
  -read_loop(Bytes) ->
  -    ?MODULE ! {data, Bytes},
  -    rs232:iflush(),
  -    read_loop(<<>>).
  +    end.
   
  -filter_msg(<<>>, Analog, Digital) ->
  -    {Analog, Digital};
  -filter_msg(<<9:4, Ch:4, Lsb:8, Msb:8, Rest/binary>>, Analog, Digital) ->
  -    filter_msg(Rest, Analog, parse_msg(Ch, Lsb, Msb, Digital));
  -filter_msg(<<14:4, Ch:4, Lsb:8, Msb:8, Rest/binary>>, Analog, Digital) ->
  -    filter_msg(Rest, parse_msg(Ch, Lsb, Msb, Analog), Digital);
  -filter_msg(<<_:8, Rest/binary>>, Analog, Digital) ->
  -    filter_msg(Rest, Analog, Digital).
  -
  -parse_msg(Ch, Lsb, Msb, Dict) ->
  -    {_, Subscribers} = dict:fetch(Ch, Dict),
  -    Value = (Msb bsl 7) + Lsb,
  -    spawn(fun() -> notify(Ch, Value, Subscribers) end),
  -    dict:store(Ch, {Value, Subscribers}, Dict).
  +parse_byte(_Byte, WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Msb) when WaitForData == 0 andalso byte < 128 andalso ExecuteMultiByteCommand == 144 ->
  +    gen_server:cast(?MODULE, {update, digital, MultiByteChannel, (Msb bsl 7) + Lsb}),
  +    {0, 0, 0, 0, 0};
  +parse_byte(_Byte, WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Msb) when WaitForData == 0 andalso byte < 128 andalso ExecuteMultiByteCommand == 224 ->
  +    gen_server:cast(?MODULE, {update, analog, MultiByteChannel, (Msb bsl 7) + Lsb}),
  +    {0, 0, 0, 0, 0};
  +parse_byte(Byte, WaitForData, ExecuteMultiByteCommand, MultiByteChannel, Lsb, _Msb) when WaitForData == 1 andalso byte < 128 ->
  +    parse_byte(Byte, 0, ExecuteMultiByteCommand, MultiByteChannel, Lsb, Byte);
  +parse_byte(Byte, WaitForData, ExecuteMultiByteCommand, MultiByteChannel, _Lsb, _Msb) when WaitForData == 2 andalso byte < 128 ->
  +    {1, ExecuteMultiByteCommand, MultiByteChannel, Byte, 0};
  +parse_byte(Byte, _WaitForData, _ExecuteMultiByteCommand, _MultiByteChannel, _Lsb, _Msb) ->
  +    {Command, NewMultiByteChannel} = case Byte of
  +        Byte when Byte < 240 ->
  +            {Byte band 240, Byte band 15};
  +        _ ->
  +            {Byte, 0}
  +    end,
  +    {2, Command, NewMultiByteChannel, 0, 0}.
   
   notify(Pin, Value, Subscribers) ->
       sets_foreach(fun(Sub) -> Sub ! {update, Pin, Value} end, Subscribers).
  
positive.code:     Analog = lists:foldl(fun(I, AccIn) -> dict:store(I, {0, sets:new()}, AccIn) end, dict:new(), lists:seq(0, 15)),
      Digital = lists:foldl(fun(I, AccIn) -> dict:store(I, {0, sets:new()}, AccIn) end, dict:new(), lists:seq(0, 15)),
      Output = lists:foldl(fun(I, AccIn) -> dict:store(I, 0, AccIn) end, dict:new(), lists:seq(0, 15)),
      spawn_link(fun() -> read_loop(<<>>) end),
      {ok, #state{analog = Analog, digital = Digital, output = Output}}.
  
  handle_call({digital, read, Pin}, _From, State = #state{digital = Digital}) ->
  
negative.code:     io:format(standard_error, "Unknown CALL message ~p~n", [Request]),
      {reply, Reply, State}.
  
  handle_cast({update, analog, Pin, Value}, State = #state{analog = Analog}) ->
      {_, Subscribers} = dict:fetch(Pin, Analog),
      spawn(fun() -> notify(Pin, Value, Subscribers) end),
      NewAnalog = dict:store(Pin, {Value, Subscribers}, Analog),
      {noreply, State#state{analog = NewAnalog}};
  handle_cast({update, digital, Pin, Value}, State = #state{digital = Digital}) ->
      {_, Subscribers} = dict:fetch(Pin, Digital),
      spawn(fun() -> notify(Pin, Value, Subscribers) end),
      NewDigital = dict:store(Pin, {Value, Subscribers}, Digital),
      {noreply, State#state{digital = NewDigital}};
  handle_cast({mode, Pin, Mode}, State) ->
      rs232:write(<<244:8/integer, Pin:8/integer, Mode:8/integer>>),
      {noreply, State};
  