28125 Parallax Inc, 28125 Datasheet - Page 246
28125
Manufacturer Part Number
28125
Description
TEXT ROBOTICS
Manufacturer
Parallax Inc
Datasheet
1.28125.pdf
(360 pages)
Specifications of 28125
Title
Robotics with the Boe-Bot
Product
Microcontroller Accessories
Lead Free Status / RoHS Status
Not applicable / Not applicable
- Current page: 246 of 360
- Download datasheet (5Mb)
' -----[ Title ]----------------------------------------------------------
' Robotics with the Boe-Bot - TestBlackWhiteLogic.bs2
' Calculate whether Boe-Bot is over black or white surface, and print.
' {$STAMP BS2}
' {$PBASIC 2.5}
' -----[ Constants ]------------------------------------------------------
LeftWhite
RightWhite
LeftBlack
RightBlack
LeftAvg
RightAvg
' -----[ Variables ]------------------------------------------------------
timeLeft
timeRight
' -----[ Main Routine ]---------------------------------------------------
DO
LOOP
' -----[ Subroutine - Test_Photoresistors ]-------------------------------
Test_Photoresistors:
RETURN
GOSUB Test_Photoresistors
IF (timeLeft > LeftAvg) THEN
ELSE
ENDIF
IF (timeRight > RightAvg) THEN
ELSE
ENDIF
HIGH 6
PAUSE 3
RCTIME 6,1,timeLeft
HIGH 3
PAUSE 3
RCTIME 3,1,timeRight
To develop a program that makes the Boe-Bot avoid the black sheets of paper,
the decision and navigation steps required are very similar to
DEBUG CRSRXY, 0, 0, "Left Black
DEBUG CRSRXY, 0, 0, "Left White
DEBUG CRSRXY, 13, 0, "Right Black", CR
DEBUG CRSRXY, 13, 0, "Right White", CR
CON
CON
CON
CON
CON
CON
VAR
VAR
16
33
26
45
LeftWhite + LeftBlack / 2
RightWhite + RightBlack / 2
Word
Word
"
"
' Stamp directive
' PBASIC directive.
' Left photoresistor reading
' Right photoresistor reading
' Left RC time Measurement.
' Right RC time measurement.
Related parts for 28125
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
Microcontroller Modules & Accessories DISCONTINUED BY PARALLAX
Manufacturer:
Parallax Inc
Part Number:
Description:
BOOK UNDERSTANDING SIGNALS
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
COMPETITION RING FOR SUMOBOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
TEXT INFRARED REMOTE FOR BOE-BOT
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BOARD EXPERIMENT+LCD NX-1000
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
CONTROLLER 16SERVO MOTOR CONTROL
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
BASIC STAMP LOGIC ANALYZER
Manufacturer:
Parallax Inc
Datasheet:
Part Number:
Description:
IC MCU 2K FLASH 50MHZ SO-18
Manufacturer:
Parallax Inc
Datasheet: