To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.scoutOpen lugnet.robotics.scout in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Scout / 156
155  |  157
Subject: 
Re: legOS
Newsgroups: 
lugnet.robotics.scout
Date: 
Thu, 15 Feb 2001 01:17:44 GMT
Viewed: 
2922 times
  
As far as sensors go for the SCOUT you DO NOT have to declare them at all. • Just
comment out anything to do with declaring Sensors. The scout uses a different
command to get the RAW values.

For the Scout the the sensors are always TOUCH.

Hope that helps.

Dean
Thank I figured out how to use the sensors I must have an old version or
somthing because i have to write the "#ifdef"decleration and the "#endif"
decleration on top and on the bottom of the "SetSensor(SENSOR_1,
SENSOR_TOUCH);" here is the retro-fited Hank The Bumper Tank program for the
scout if anybody wants it:

#define BACK_TIME 50
#define TURN_TIME 80

task main() {
#ifdef _RCX
SetSensor(SENSOR_1,SENSOR_TOUCH);
#endif
#ifdef _RCX
SetSensor(SENSOR_2,SENSOR_TOUCH);
#endif
OnFwd(OUT_A+OUT_C);
while (true) {
if (SENSOR_1 == 1){
PlayTone(440, 50);
OnRev(OUT_A+OUT_B);
Wait(BACK_TIME);
OnFwd(OUT_A);
Wait(TURN_TIME);
OnFwd(OUT_B);
}
if(SENSOR_2 == 1) {
PlayTone(880, 50);
OnRev(OUT_A+OUT_B);
Wait(BACK_TIME);
OnFwd(OUT_C);
Wait(TURN_TIME);
OnFwd(OUT_A+OUT_B);
}
}
}

If you can find some way to improve it please E-Mail me at
neo.fortworks.com
P.S. If you want you can mount a touch sensor so that it is facing down and
always is touching the ground. reprogram the if (SENSOR_1 == 1)to
if (SENSOR_1 == 0) and so on, put it on a table and let er run! if it goes off
the table the touch sensor should be released an the robot will turn around!

Alex



Message has 1 Reply:
  Re: legOS
 
Sorry my E-mail address is neo@fortworks.com Alex (24 years ago, 15-Feb-01, to lugnet.robotics.scout)

Message is in Reply To:
  Re: legOS
 
(...) As far as sensors go for the SCOUT you DO NOT have to declare them at all. Just comment out anything to do with declaring Sensors. The scout uses a different command to get the RAW values. For the Scout the the sensors are always TOUCH. Hope (...) (24 years ago, 14-Feb-01, to lugnet.robotics.scout)

15 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