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 / 14832
14831  |  14833
Subject: 
Re: Racing Line Follower
Newsgroups: 
lugnet.robotics
Date: 
Mon, 2 Apr 2001 16:24:51 GMT
Viewed: 
691 times
  
I think I would take your stop watch back to the jeweler.

--
Bob Fay
rfay@we.mediaone.net

http://bobfay.users5.50megs.com/index.html
http://www.geocities.com/Heartland/Bluffs/7900/
"Magnus Fasting" <lego-robotics@crynwr.com> wrote in message
news:3.0.6.32.20010402154535.009a1008@online.no...
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 1 Reply:
  Re: Racing Line Follower
 
(...) HeHeHe !!! :-) (24 years ago, 2-Apr-01, to lugnet.robotics)

Message is in Reply To:
  Racing Line Follower
 
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 (...) (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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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