anchor.diff:  
   stop(Fd) ->
       %% reset pin value
  -    i2c:i2c_write(Fd, ?ADDR, {?GPIO, 0}, 2),
  -    i2c:stop(),
  +    i2c:i2c_write(?I2C_CHANNEL, Fd, ?ADDR, {?GPIO, 0}, 2),
  +    i2c:stop(?I2C_CHANNEL),
  +    i2c_sup:stop(),
       bye.
       
  
positive.code: -define(IODIR, 16#0).
  -define(GPIO, 16#9).
  
  init() ->
      i2c:start_link(),
      %% initialize i2c bus
      Fd = i2c:i2c_init(),
      %% set pin directions
      i2c:i2c_write(Fd, ?ADDR, {?IODIR, 16#f}, 2),
      %% reset pin value
      i2c:i2c_write(Fd, ?ADDR, {?GPIO, 0}, 2),
      Fd.
  
  %% Runs the demo
  
negative.code: %% Main function
  start(Fd, Count) when Count < 16 ->
      %% turn on the led
      i2c:i2c_write(?I2C_CHANNEL, Fd, ?ADDR, {?GPIO, Count bsl 4}, 2),
      timer:sleep(1000),
      
      %% read DIP switches
      i2c:i2c_write(?I2C_CHANNEL, Fd, ?ADDR, {?GPIO}, 1),
      timer:sleep(10),
      {Val}=i2c:i2c_read(?I2C_CHANNEL, Fd, ?ADDR, 1),
      io:format("GPIO=~.16B : GP0: ~.16B  GP1: ~.16B  GP2 ~.16B  GP3 ~.16B~n",[Val, Val band 1, (Val band 2) bsr 1, (Val band 4) bsr 2, (Val band 8) bsr 3]),
      start(Fd, Count + 1);
  start(_Fd, _Count) ->
  