28125 Parallax Inc, 28125 Datasheet - Page 177

TEXT ROBOTICS

28125

Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet

Specifications of 28125

Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
match your Boe-Bot and particular surface. For a triangle pattern, the Boe-Bot
must travel 1 meter/yard forward, then make a 120 degree turn. This should be
repeated three times for the three sides of the triangle. You may have to adjust
the
120 degree turn.
' Robotics with the Boe-Bot - Chapter 4 - Triangle.bs2
' Boe-Bot navigates triangle shape with 1 yard sides.
' Go forward, then turn 120 degrees.
'{$STAMP BS2}
'{$PBASIC 2.5}
DEBUG "Program running!"
counter
pulseCount
FREQOUT 4, 2000, 3000
Main:
Forward:
Right_Rotate120:
FOR counter = 1 TO 3
NEXT
END
FOR pulseCount = 1 TO 163
NEXT
RETURN
FOR pulseCount = 1 TO 21
NEXT
RETURN
pulseCount EndValue
GOSUB Forward
GOSUB Right_Rotate120
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 850
PULSOUT 12, 850
PAUSE 20
VAR
VAR
Nib
Word
in the
Right_Rotate120
' Triangle has 3 sides
' Pulse count to servos
' Signal program start/reset.
' Repeat 3 times for triangle
' Forward 1 yard
' Rotate right 120 degrees
Repeat three times.
subroutine to get a precise

Related parts for 28125