Recent Changes - Search:

TEAMS Academy Wiki

Explore TEAMS!
for visiting sophomores & juniors

Robotics

EnvBioTech

Bat Design

Assistive Tech


Students


Instructors

TEAMS Forum

TEAMS Calendar

TEAMS Web Site

Wiki Info

edit Student.SideBar

Lab3Amber

Line Following Write-Up

After going through the beginner programming exercise, it was very easy to derive a working code for line following. One lesson that I learned was to use semicolons! That cannot be stressed enough; it is very frustrating to debug just for that. Another thing that I learned was that the COM ports have to be checked and corrected before the robot is programmed at any time. Even on the same computer, the COM port would vary from day to day. The last thing that I learned was that you must take into account all possible situations. I remembered both of the sensors being white and one sensor on each color when I was programming, but I forgot the situation that both sensors could be on black.

	For the most part, the Create drove fairly smoothly on the Create course. The only problem was that the Create couldn’t make it around very tight turns where both of the sensors detected black at the same time. When this happen, the Create would jerk in between the two lines and would not be able to drive. I tried to correct the code so the Create would rotate until only one sensor detected black, but that didn’t work either. Instead of following the line it detected first, it would jerk between the two, even if one was sensed first.  The Create was just too wide for such a tight turn.This is one of the limitations of the Create. At times it can be wide and bulky, especially since it can't turn on a dime. If I could add something on to the Create, I would add more IR sensors to detect which direction the lines came from so the Create could know which way to turn. I would attach a couple more out to the sides so if the Create rotates a little the direction the line is from could be determined.  Also, the slower the Create, the more accurate it will follow. 100mm/s sometimes works; 75mm/s almost always works.

	On different colored floors, the following the line can still work with red tape. Red tape has high readings from the Create’s cliff sensors, while other floor colors have lower, the exception being yellow. The only thing you would have to change in the code is the if statement that says when the sensor readings are less than 800. All you would have to do would be to change the range to be greater than the 1200, smallest sensor reading of red.

	I programmed a few safety features into the Create. When a bump sensor is activated, the Create will turn away from the source and continue on its normal course. If the left or right cliff sensor is activated, the Create will come to a complete stop. I also programmed the Create so that when either the front left or front right cliff sensor is activated, the LED on the same side will turn on.

Code for line following part 1 Δ

Code for line following part 2 Δ

Flow chart for line following Δ

Edit - History - Print - Recent Changes - Search
Page last modified on December 19, 2007, at 06:08 PM