28125 Parallax Inc, 28125 Datasheet - Page 217

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
Figure 6-6: Modify RoamingWithPhotoresistorDividers.bs2
' Excerpt from
' RoamingWithPhotoresistor
' Dividers.bs2
IF (IN6
ELSEIF (IN6
ELSEIF (IN3
ELSE
ENDIF
ACTIVITY #3: A MORE RESPONSIVE SHADOW CONTROLLED BOE-BOT
By eliminating the
Bot significantly more responsive. This wasn’t really possible with the whiskers, because
the Boe-Bot had to back up before turning since it had already made physical contact
with the obstacle. When you are using shadows to guide the Boe-Bot, it can check
between each pulse to see if the shadow is still detected regardless of whether it’s moving
forward or executing a maneuver.
A Simple Shadow Controlled Boe-Bot
One interesting form of remote control is to have the Boe-Bot sit still in normal light,
then follow a shadow you cast over the photoresistors. It’s kind of a user-friendly way of
guiding the Boe-Bot’s motion.
Example Program – ShadowGuidedBoeBot.bs2
When you run this next program, the Boe-Bot should stay still when no shadow is cast
over its photoresistor dividers. When you cast a shadow over both photoresistors, the
GOSUB Back_Up
GOSUB Turn_Left
GOSUB Turn_Left
GOSUB Back_Up
GOSUB Turn_Right
GOSUB Back_Up
GOSUB Turn_Left
GOSUB Forward_Pulse
Modify RoamingWithPhotoresistorDividers.bs2 as shown in the right side of
Figure 6-6.
Run the program, and compare the performance.
= 0) AND (IN3 = 0) THEN
= 0) THEN
= 0) THEN
FOR…NEXT
loops in the navigation subroutines, you can make the Boe-
' Modified excerpt from
' RoamingWithPhotoresistor
' Dividers.bs2
IF (IN6
'
'
ELSEIF (IN6
'
ELSEIF (IN3
'
ELSE
ENDIF
GOSUB Back_Up
GOSUB Turn_Right
GOSUB Turn_Left
GOSUB Forward_Pulse
GOSUB Turn_Left
GOSUB Turn_Left
GOSUB Back_Up
GOSUB Back_Up
= 0) AND (IN3 = 0) THEN
= 0) THEN
= 0) THEN

Related parts for 28125