28125 Parallax Inc, 28125 Datasheet - Page 92

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
' Robotics with the Boe-Bot – ServoP12Clockwise.bs2
' Run the servo connected to P12 at full speed clockwise.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
LOOP
Example Program: ServoP12Counterclockwise.bs2
You have probably anticipated that making the
greater than 750 will cause the servo to rotate counterclockwise. A
send 1.7 ms pulses as shown in Figure 2-26. This will make the servo turn full speed
counterclockwise.
' Robotics with the Boe-Bot – ServoP12Counterclockwise.bs2
' Run the servo connected to P12 at full speed counterclockwise.
' {$STAMP BS2}
' {$PBASIC 2.5}
Vdd (5 V)
Vss (0 V)
PULSOUT 12, 650
PAUSE 20
Run the program and verify that the servo connected to P12 is now rotating
between 50 and 60 RPM clockwise.
Save ServoP12Clockwise.bs2 as ServoP12Counterclockwise.bs2.
Modify the program by changing the
from 650 to 850.
Run the program and verify that the servo connected to P12 is now rotating
between 50 and 60 RPM counterclockwise.
1.7 ms
20 ms
www.parallax.com
standard servo
PULSOUT
PULSOUT
command’s
command’s
1.7 ms
Duration
Duration
Duration
Figure 2-26
A 1.7 ms Pulse
Train Makes the
Servo Turn Full
Speed
Counterclockwise
of 850 will
argument
argument

Related parts for 28125