28125 Parallax Inc, 28125 Datasheet - Page 69

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
Example Program: PulseP13Led.bs2
This timing diagram in Figure 2-8 shows the pulse train you are about to send to the LED
with this new program. This time, the high signal lasts for 0.13 seconds, and the low
signal lasts for 2 seconds. This is 100 times slower than the signal that the servo will
need to control its motion.
' Robotics with the Boe-Bot – PulseP13Led.bs2
' Send a 0.13 second pulse to the LED circuit connected to P13 every 2 s.
' {$STAMP BS2}
' {$PBASIC 2.5}
DEBUG "Program Running!"
DO
LOOP
Example Program: PulseBothLeds.bs2
This example program sends a pulse to the LED connected to P13, and then it sends a
pulse to the LED connected to P12 as shown in Figure 2-9. After that, it pauses for two
seconds.
PULSOUT 13, 65000
PAUSE 2000
Vdd (5 V)
Vss (0 V)
Enter, save, and run PulseP13Led.bs2.
Verify that the LED circuit connected to P13 pulses for about thirteen
hundredths of a second, once every two seconds.
0.13 s
2.0 s
0.13 s
Figure 2-8
Timing Diagram
for
PulseP13Led.bs2

Related parts for 28125