Activity #3: A More Responsive Shadow Controlled Boe-Bot - Parallax Boe-Bot Student Manual

Hide thumbs Also See for Boe-Bot:
Table of Contents

Advertisement

Figure 6-6: Modify RoamingWithPhotoresistorDividers.bs2
' Excerpt from
' RoamingWithPhotoresistor
' Dividers.bs2
IF (IN6
= 0) AND (IN3 = 0) THEN
GOSUB Back_Up
GOSUB Turn_Left
GOSUB Turn_Left
ELSEIF (IN6
= 0) THEN
GOSUB Back_Up
GOSUB Turn_Right
ELSEIF (IN3
= 0) THEN
GOSUB Back_Up
GOSUB Turn_Left
ELSE
GOSUB Forward_Pulse
ENDIF
Modify RoamingWithPhotoresistorDividers.bs2 as shown in the right side of
Figure 6-6.
Run the program, and compare the performance.

ACTIVITY #3: A MORE RESPONSIVE SHADOW CONTROLLED BOE-BOT

By eliminating the
FOR...NEXT
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
Chapter 6: Light Sensitive Navigation with Photoresistors · Page 203
' Modified excerpt from
' RoamingWithPhotoresistor
' Dividers.bs2
IF (IN6
GOSUB Back_Up
'
GOSUB Turn_Left
'
GOSUB Turn_Left
ELSEIF (IN6
'
GOSUB Back_Up
GOSUB Turn_Right
ELSEIF (IN3
'
GOSUB Back_Up
GOSUB Turn_Left
ELSE
GOSUB Forward_Pulse
ENDIF
loops in the navigation subroutines, you can make the Boe-
= 0) AND (IN3 = 0) THEN
= 0) THEN
= 0) THEN

Advertisement

Table of Contents
loading

Table of Contents