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

TaylorGendronLabs

Taylor Gendron

11/9/07

Lab 3

Blue Cohort


Lab 3 Pre-Lab Questions

1. The value that I’ve established for black electrical tape is 600 because all of the sensor strength readings were in the 500’s so I rounded up to the next hundred. For white paper I’ve established the value of 1000 because all of the sensor signal strength readings were greater than 1000 and I rounded down to the closest hundred. I used the average value in my program so in case fluke readings occur that are a little greater or less than the normal readings for their respective colors, they will not be misidentified by the create.

2. I used the average of the black and white values, which turned out to be equal to 800.

3. When the front right sensor is place directly over a strip of black electrical tape and the program is run the advance LED goes on.

4. No, if you push the robot of the tape the robot’s LEDs will not change because a while statement was not used and thus the program is not looping ( it only polls the sensor once). If you push the robot of the black tape and then reset the program the play LED will light up.

5. If you push the robot over white and run the program the play LED will light up.

6. The two choices for the while loop blank are 0 and 1, which represent the state of the play button ( 0 represents not pressed, 1 represents pressed). The better choice for the loop is 0 because that means that the loop will continue as long as the play button is not pressed (or until it is pressed). 1 would be a bad choice because the loop would only continue if the play button was pressed and it would be difficult to hold down the play button while the robot was in motion.

7. The cliff sensor is perfectly sensitive to the change in color between white and black and the LEDs indicate a change in color immediately, when the sensor is put over a new color.

8. The LED cliff sensor display is implemented in my program. (see program)


Discussion

    The aim of this lab was to make a program for a create that would make it follow a line of black electrical tape on a white surface. For the most part I was able to accomplish the goal of the lab. My program consists of four parts, one for each condition that the infrared sensors can encounter in this lab’s environment: black/white, white/black, white/white, and black/black. When put on the track with the electrical tape on it the create is able to overcome each of the conditions stated above except black/black. When the create encounters black/black it begins to jerk left to right in a violent seizure, and it makes a noise that I compare to a alien ship. There are a few possible reasons for the black/black malfunction. One reason is that it is almost impossible for the create to sense black at the same exact time with both IR sensors, and because of that fact the create jerks right when it senses black with its left sensor and vice versa for the right sensor. 
	Another conflict is a possible mistake in programming. Also, I’m just learning to program so my skills are inferior to an experienced programmer (what I mean is that I acknowledge the fact that there may be a way to debug the problem through revised programming, just not one that I’m aware of yet). An idea that I had to combat the seizures was to have the robot do a sort of wait angle, but right now I don’t know of any wait functions. Instead of having the robot have a seizure I programmed it to recognize black/black as white/white so it just drives over and sometimes it finds the line again(which is better than just getting stuck).If in the future some wait functions are developed which can be implemented in WINAVR, then the create may be able to conquer the race way with a new debugged program.
	 The raceway that was laid out for this lab may have some inherent limitations in which the create may not be able to overcome simply because its anatomy doesn’t allow it to. For example when the create comes to a right angle both of the IR sensors sense black and I believe that because of the create’s anatomy it will get stuck in some kind of repeated motion (seizure) regardless of the program. Another tricky obstacle is the hairpin turn.
	Lastly, the create has the ability to connect to additional sensors which could improve its ability to line follow. A possible solution to the black/black dilemma could be to take an additional IR sensor and hang it directly over the midpoint of the two front cliff sensors. Because the IR sensor would protrude from the front of the create it would be able to sense white when the other two IR sensors sense black/black and then it could be programmed to find black and possible center the create over the black line correctly.

NOTE~Mr.Rhine.On my report I didn't have anything about the lessons I learned in from the lab and I had 15 points deducted.So below I'll list what I learned from lab 3.

In Lab 3 I learned ....

  • how to define a constant
  • That a while statement is an infinite loop as long as the stated condition is true
  • That all commands need a semicolon after them and if you forget to put one annoying syntax error will result
  • How to debug a program with the use of LEDS and other simple methods
  • How to put an inequality within an if or while statement
  • How to account for all possible scenarios in your code
  • That sometimes there are situations that you can't overcome because of the create's layout
  • How to perservere and not become annoyed while making a program

Line Following Code

Lab 3 Code Δ

NOTE~Mr.Rhine, on my code that you graded from my report I didn't have comments and you deducted 15 points. I've added in the comments that I should have had before in the above code.


Lab 3 Flowchart (Microsoft Excel) Δ

NOTE~Mr.Rhine, I fixed the errors on my flow chart from when you corrected it. (I originally lost 8 points)

Edit - History - Print - Recent Changes - Search
Page last modified on January 22, 2008, at 08:41 PM