To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 14829
14828  |  14830
Subject: 
Racing Line Follower
Newsgroups: 
lugnet.robotics
Date: 
Mon, 2 Apr 2001 13:45:35 GMT
Original-From: 
Magnus Fasting <pleboy@online.no!spamless!>
Viewed: 
709 times
  
Hello

I've built a line follower which is quite fast (approx 4 secs per lap on
the testpad). It consists of two motors, each powering a 2/3 geared large
wheel. Two light sensors are attached to the front pivot wheel. The
distance between the sensors are 5 "lego units".

My problem is the program. I think it's too "uncomplicated". I guess i
could do more out of it, but i'm not a very good programmer.

Any suggestions to improvements in the program is appreciated.

The program:


#define white 41


task main() {
SetPower(OUT_A + OUT_C,8);
SetSensor(SENSOR_1,SENSOR_LIGHT);
SetSensor(SENSOR_3,SENSOR_LIGHT);

while(true) {
        while(SENSOR_1>white && SENSOR_3>white) {
        OnFwd(OUT_A + OUT_C);
        }

        while(SENSOR_1<white) {
        Off(OUT_A);
        Wait(2);
        OnFwd(OUT_A + OUT_C);
        }

        while(SENSOR_3<white) {
        Off(OUT_A);
        Wait(2);
        OnFwd(OUT_A + OUT_C);
        }

}
}

--

Magnus Fasting
E-mail: pleboy@online.no
Icq: 28291552



Message has 3 Replies:
  Re: Racing Line Follower
 
I think I would take your stop watch back to the jeweler. -- Bob Fay rfay@we.mediaone.net (URL) Fasting" <lego-robotics@crynwr.com> wrote in message news:3.0.6.32.200104...line.no... (...) (24 years ago, 2-Apr-01, to lugnet.robotics)
  Re: Racing Line Follower
 
In Creative Projects I make recommendations on line followers. One of them is to add a touch sensor that you can use as a trigger to grab the light levels of the line and the surface and store them in memory. Then you can use the average of those (...) (24 years ago, 2-Apr-01, to lugnet.robotics)
  Re: Racing Line Follower
 
(...) I've built a few line followers to see how fast I can do the test track - but I've concluded that you have a quality/speed tradeoff. I've built robots that *approximately* follow the track at these kinds of speeds - but without some kind of (...) (24 years ago, 2-Apr-01, to lugnet.robotics)

5 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR