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

SeamusLightFollowing

Attach:SeamusLab5.jpg Δ

	The purpose of doing this lab was to get the robot to search for a light source, home in on it, and get as close as possible then stop.  Also, another task to perform would be the opposite and go away from light.  A major aspect for this assignment was to use the play and advance buttons to control the modes and to eliminate the use of the reset button on the module.
	The major approach towards completing this lab was finding an equation that would account for the different sensitivities in the two light sensors.  By doing this a change in light can be read evenly and the same with both sensors.  This is done by first collecting data from the two sensors.  After finding the high and low light values for each sensor, an equation can be formed.  Setting up ordered pairs as follows, (0, low light value) and (255, high light value).  Using simple algebra one can form an equation from the ordered pairs.  After finding these equations, just use them in your drive direct command.  The left wheel is based on the right light sensor’s equation and obviously the right wheel goes with the left sensor.  That is to go towards the light; it would be reversed if you wanted to run away from the light.  That one line of coding is the basis for the entire lab.  Other than that the task demands a search pattern.  Basically my pattern was to go the brightest spot visible and if it bumped into something to simple turn away and continue the search.  Then to stop at the light, the robot just waits until a bumper is hit when the light sensors are over a certain value.
	To be honest this method worked really well from the beginning most of the changes made to the code were to give control of the robot completely to the play and advance buttons.  During the demo the robot did a flawless job making to the light and stopping the only thing that could be changed is maybe instead of speeding up when it got close to the light it should have slowed down to be more precise, however, it got the job done in very good time.

Code Δ

Flowchart Δ

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