EasyManuals Logo

Parallax Boe-Bot User Manual

Parallax Boe-Bot
360 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #240 background imageLoading...
Page #240 background image
Page 226 · Robotics with the Boe-Bot
difference = difference / Denominator
RETURN
There is a better way though.
Leave the
Average_And_Difference routine like this:
Average_And_Difference:
average = timeRight + timeLeft / 2
difference = average / Denominator
RETURN
Next, make this change in the variable declarations:
Figure 6-13: Modify RoamingTowardTheLight.bs2 to Save a Word of RAM
' Unchanged code
average VAR Word
difference VAR Word
' Changed to save Word of RAM
average VAR Word
difference VAR average
We don’t really need the average variable, but the program will make more sense to
someone trying to understand it if we use the word
average in the first line and the word
difference in the second line. Here is how to create an alias name difference for the
average variable.
difference VAR average
Now, both
average and difference refer to the same word of RAM.
Test your modified program and make sure it still works properly.

Table of Contents

Other manuals for Parallax Boe-Bot

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Parallax Boe-Bot and is the answer not in the manual?

Parallax Boe-Bot Specifications

General IconGeneral
BrandParallax
ModelBoe-Bot
CategoryRobotics
LanguageEnglish