Chapter 2: SumoBot Locomotion · Page 15
' SumoBot_2.1_Motor_Align.BS2
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ I/O Definitions ]-------------------------------------------------
LMotor PIN 13 ' left servo motor
RMotor PIN 12 ' right servo motor
' -----[ Constants ]-------------------------------------------------------
LStop CON 750 ' left motor stop
RStop CON 750 ' right motor stop
' -----[ Initialization ]--------------------------------------------------
Reset:
LOW LMotor ' initialize motor outputs
LOW RMotor
' -----[ Program Code ]----------------------------------------------------
Main:
DO
PULSOUT LMotor, LStop ' stop left
PULSOUT RMotor, RStop ' stop right
PAUSE 20
LOOP
END
Move the SumoBot power switch to position 2, and then download the code using the
Run command from the Run menu, or by pressing the
►
button on the toolbar. As soon
as the program is downloaded, watch for wheel movement. If either motor turns, insert a
small screwdriver into the adjustment port of the servo and adjust the centering
potentiometer until the motor stops. Figure 2.5 shows the location of the servo
adjustment ports.
Summary of Contents for Boe-Bot
Page 1: ...SumoBot Mini Sumo Robotics Assembly Documentation and Programming VERSION 2 1...
Page 4: ......
Page 9: ...Preface Page ix...
Page 10: ......
Page 20: ......
Page 32: ......
Page 54: ......
Page 74: ......
Page 76: ......
Page 77: ...Appendix D SumoBot PCB Schematic Page 67 Appendix D SumoBot PCB Schematic...