View Single Post
  #13   Spotlight this post!  
Unread 06-01-2003, 17:53
rwaliany's Avatar
rwaliany rwaliany is offline
R
None #0691 (HartBurn)
Team Role: Programmer
 
Join Date: Jan 2003
Rookie Year: 2000
Location: http://www.hartrobot.com
Posts: 137
rwaliany will become famous soon enough
Sensors

They're pretty basic once you have them hooked up. If you're trying to create a line follower simply attach a light sensor to one of the digital inputs. Check whether the number one corresponds to the white line or the other material next to the white line "Debug ? rc_sw(switch)". If they are the same then adjust the circle knob thing on the back of the light sensor till one is invoking one and one is invoking zero. Once thats done, then use an if statement and make the robot move left and forward if it sees the whiteline and right and forward if it sees the other surface.

If you want to be more advanced you can use two light sensors, which will allow you to move faster, and if one of them sees the white line turn the opposite direction. If they are both giving the no-white-line signal then go forward.
__________________
R

Last edited by rwaliany : 06-01-2003 at 18:04.