Difference between revisions of "BoeBot"

From RoboWiki
Jump to: navigation, search
Line 1: Line 1:
 
Example 1:
 
Example 1:
  
<source lang="c">
+
<source lang="pas">
 
' Robotics with the Boe-Bot - StartResetIndicator.bs2
 
' Robotics with the Boe-Bot - StartResetIndicator.bs2
 
' Test the piezospeaker circuit.
 
' Test the piezospeaker circuit.

Revision as of 12:28, 11 December 2008

Example 1:

' Robotics with the Boe-Bot - StartResetIndicator.bs2
' Test the piezospeaker circuit.

' {$STAMP BS2}                   ' Stamp directive.
' {$PBASIC 2.5}                  ' PBASIC directive.

 DEBUG CLS, "Beep!!!"            ' Display while speaker beeps.
 FREQOUT 4, 2000, 3000           ' Signal program start/reset.

 DO                              ' DO...LOOP
  DEBUG CR, "Waiting for reset…" ' Display message
  PAUSE 500                      ' every 0.5 seconds
 LOOP                            ' until hardware reset.