28125 Parallax Inc, 28125 Datasheet - Page 164

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
FREQOUT 4, 2000, 3000
' -----[ Main Routine ]-------------------------------------------------------
DO UNTIL (instruction = "Q")
LOOP
END
' -----[ Subroutine - Forward ]-----------------------------------------------
Forward:
' -----[ Subroutine - Backward ]----------------------------------------------
Backward:
' -----[ Subroutine - Left_Turn ]---------------------------------------------
Left_Turn:
READ address, instruction
address = address + 1
SELECT instruction
ENDSELECT
FOR pulseCount = 1 TO 64
NEXT
RETURN
FOR pulseCount = 1 TO 64
NEXT
RETURN
FOR pulseCount = 1 TO 24
NEXT
RETURN
CASE "F": GOSUB Forward
CASE "B": GOSUB Backward
CASE "L": GOSUB Left_Turn
CASE "R": GOSUB Right_Turn
PULSOUT 13, 850
PULSOUT 12, 650
PAUSE 20
PULSOUT 13, 650
PULSOUT 12, 850
PAUSE 20
PULSOUT 13, 650
PULSOUT 12, 650
PAUSE 20
' Signal program start/reset.
' Data at address in instruction.
' Add 1 to address for next read.
' Call a different subroutine
' for each possible character
' that can be fetched from
' EEPROM.
' Stop executing until reset.
' Forward subroutine.
' Send 64 forward pulses.
' 1.7 ms pulse to left servo.
' 1.3 ms pulse to right servo.
' Pause for 20 ms.
' Return to Main Routine loop.
' Backward subroutine.
' Send 64 backward pulses.
' 1.3 ms pulse to left servo.
' 1.7 ms pulse to right servo.
' Pause for 20 ms.
' Return to Main Routine loop.
' Left turn subroutine.
' Send 24 left rotate pulses.
' 1.3 ms pulse to left servo.
' 1.3 ms pulse to right servo.
' Pause for 20 ms.
' Return to Main Routine loop.

Related parts for 28125