anchor.diff:      stop(rotate_right),
       firmata:stop().
   
  +emergency_stop(Device) ->
  +    setup(Device),
  +    stop(forward),
  +    firmata:stop().
  +
   % Private API
   
   setup(Device) ->
  
positive.code:     Distance = firmata:digital_read(?PING),
      case Distance of
          Value when Value > ?THRESHOLD andalso PrevDistance =< ?THRESHOLD ->
              stop(rotate_left),
              forward();
          Value when Value > ?THRESHOLD andalso PrevDistance > ?THRESHOLD ->
  
negative.code: -module(bot).
  -export([start/1, test/1, emergency_stop/1]).
  -define(PING, 7).
  -define(PWM_LEFT, 3).
  -define(PWM_RIGHT, 11).
  