Recent Changes - Search:

TEAMS Academy Wiki

THS

Explore TEAMS!
for visiting sophomores & juniors


Robotics


EnvBioTech

Bat Design

Assistive Tech

Students

Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Robots.SideBar

SeamusLineFollowLab

Code

Flowchart


Discussion

The main objective of this lab was to program the robot to follow a line of black tape on a white backboard. The final product for me turned out to be a lot simpler than I would have expected. My code only involves 1 while loop, which makes the program continuous, 2 if statements, and a couple lines of coding to update sensors and drive forward. The first if statement was if the right cliff sensor got a reading that there was black tape present, then it was to start driving forward while turning right until that statement is no longer true. The other if statement I the same only for the front left cliff sensor, and if it is true then the robot drives forward turning left. When neither statement is true then the robot drives forward until they are.

	My first piece of coding “worked” but had some issues.  It would eventually follow the line, but in the process it would be spastic trying to figure out what to do.  Turns out that an additional two statement s I had contradicted each other.  Therefore when it read that there was a line underneath the front left cliff sensor it was trying to turn left but right at the same time.  The solution was to eliminate not needed statements, in my code they are left under comments to show this.
Edit - History - Print - Recent Changes - Search
Page last modified on December 21, 2007, at 06:51 PM