'light.bs2 www.robotics.com 'This routine demonstrates how to turn on and off the headlight. The headlight will turn on and off every second. charn var byte 'input variable. net con 8 'coprocessor network pin. baud con 396 'network baud rate. main serout net,baud,["!1M21"] 'turn the headlight on. serin net,baud,[charn] 'get ack from coprocessor. pause 1000 'wait one second. serout net,baud,["!1M20"] 'turn the headlight off. serin net,baud,[charn] 'get ack from coprocessor. pause 1000 'wait one second. goto main 'loop forever.