Grisbot (S3) follows the light

grisbot s3

Poor Little Grisbot S3, I misprogrammed it this morning and instead of going forward it went backward — and off the table onto the floor. Despite landing upside down, it worked all right once I unbent the photocell leads.

Anyhow, here is the video of what I’ve programmed it to do now:

Programming this was a bit more challenging than I thought it would be. It ended up requiring multiple variables and calculations that broke the light responses into four zones:

light follow circle

(Click to enlarge.)

ZONE I: The left photocell reading is higher than the right, so we turn left.

ZONE II: The difference between left and right photocells is less than a set value, so we go forward.

ZONE III: The right photocell reading is higher than the left, so we turn right.

ZONE IV: The total of the left and right photocell readings is below a set value, so we stop.

Who sets the ‘set values?’ Why, the programmer does. And I’ll bet the robot behaves significantly different depending how they’re set.

About engineerzero

Once and future engineer.
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s