View Single Post
  #3   Spotlight this post!  
Unread 24-01-2003, 07:54
rust710's Avatar
rust710 rust710 is offline
Registered User
#0862 (Lightning Robotics)
 
Join Date: Dec 2002
Location: Canton, MI
Posts: 103
rust710 is an unknown quantity at this point
Send a message via AIM to rust710
Line tracking is very simple. I can do it with one sensor and 5 lines of user code added to the default code. I hooked the white wire to rc_sw1(port one on the Digital Inputs) and used this code.

Code:
if rc_sw1 = 0 then
PWM1 = 137
PWM2 = 90
else
PWM1 = 90
PWM2 = 137
endif
This is the simplest way I can think of to do line tracking. The only problem is it is slow and it can lose the line with a bump or the sensor not reading right. I would recommend using at least two sensors to follow each side of the line.

Hope this helps.