'{$STAMP BS2} '-------------------------------------------------------- 'navrw.bs2 ' 'This simple example program uses the front and 'rear whiskers to navigate. ' 'The robot will move forward until: ' If one of the front whisker activates ' then the robot moves backwards. ' If the rear whisker activates ' then the robot moves forward. net con 8 'Coprocessor network pin baud con 396 'Coprocessor baud rate start: serout net,baud,["!1R180"] 'Center steering pause 100 startb: if in14=1 then startb 'Wait 4 start button main: if in0=0 or in1=0 then mainf 'Front whisker? serout net,baud,["!1M116FFFF"] 'Drive motor forward pause 100 goto main mainf: if in2=0 then main 'Rear whisker? serout net,baud,["!1M106FFFF"] 'Drive motor reverse pause 100 goto mainf