Subject:
|
Re: Competitive MINDSTORMS: Now in a store near you!
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 19 Aug 2004 15:28:04 GMT
|
Viewed:
|
1228 times
|
| |
| |
In lugnet.announce, David Perdue wrote:
> After more than a year since its conception, I am proud to announce the
> completion and publication of Competitive MINDSTORMS: A Complete Guide to
> Robotic Sumo Using LEGO MINDSTORMS.
David,
I was looking over the robots & code listed in your "bonus chapters", and I must
confess, I'm a bit disappointed. Maybe I'm missing something, but I'd be
interested to know how these robots have actually done in competition.
Maybe you can help me out, by explaining how this search task (written for
Brain-Bot-ZR1 from Bonus Chapter 2) is designed to work...
------------
/* This task searches for the other
* sumo-bot with a second light sensor*/
task Search()
{
// second highest priority
SetPriority(1);
while(true) // infinite loop - always check for sumo-bots
{
until(LBump<=thresh); // until sensor detects sumo-bot
acquire(ACQUIRE_USER_1) // get control
{
Wait(CALIBRATION); // wait a little
/* if Input Port 1 is less than "thresh" or
* equal to 100*/
if(LBump<=thresh | LBump==100)
{
BL = 1;
BR = 1;
SwitchSTurn(); // if true, go on slow speed and...
speed = 1;
Forward(); // ...attack!
until(LBump==thresh+5); // until sumo-bot goes away
SwitchF(); // stop attacking
speed = 0;
BL = 0;
BR = 0;
PlaySound(SOUND_UP);
}
}
}
}
-----------
I know LBump is the left touch sensor & forward-facing light sensor. And thresh
gets it's value from LBump, when the robot is calibrated. But, I don't see this
task as something that will do a lot of good.
So, how well does it work?
Thanks
Steve
|
|
Message has 2 Replies: | | Re: Competitive MINDSTORMS: Now in a store near you!
|
| (...) Hi Steve, I think I see where you're getting confused. Summed up, some of the concepts presented in this chapter build upon Chapter 6 in Competitive MINDSTORMS, so it's important to understand the concepts in that chapter before reading the (...) (20 years ago, 19-Aug-04, to lugnet.robotics)
| | | Re: Competitive MINDSTORMS: Now in a store near you!
|
| (...) I finally downloaded and read the bonus chapters as well, and (of course) got confused. I've only been using NQC for a little over a year, so it could be my inexperience, but I knew C for several years prior to using NQC, so I'm not a complete (...) (20 years ago, 22-Aug-04, to lugnet.robotics)
|
Message is in Reply To:
29 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
|
|
|
|