Subject:
|
Re: NXT Newbie "Is it possible" question
|
Newsgroups:
|
lugnet.robotics, lugnet.technic
|
Date:
|
Thu, 26 Aug 2010 15:20:44 GMT
|
Viewed:
|
38909 times
|
| |
| |
In lugnet.robotics.nxt, Brian Davis wrote:
> In lugnet.robotics.nxt, Kevin L. Clague wrote:
>
> > You might be able to come up with a simpler algorithm, but
> > this one should be very reliable.
>
> Well, just for diversity here's a slightly different approach. Make the first
> block a "Reset Timer" block, then split the program into four sequences. Each is
> simply a "Wait for Touch Sensor", followed by "Read Timer" block with the result
> wired into a variable block: "Time1", "Time2", "Time3, or "Time4". after all
> these timers are non-zero, just compare them to determine the winner.
>
> You could have each sequence beam display its own time on a certain line on the
> LCD "as it happens", which would be fun to watch. Note also that for alternative
> implementations of this, four parallel sequence beams might not be needed -
> after all, even with four sequences "in parallel", the NXT is really only
> watching them one at a time. By using the the "Wait" block you get around this
> slightly (the FW is watching the sensors, not your program), but there's always
> going to be a sequential evaluation of the sensors... it then becomes a question
> of how often the sensors are polled, vs. how close you realistically think the
> race is going to be.
I like it! As they say "There's more than one way to skin a cat".
I work on computer servers that have 128 CPUs per chip and 512 CPUs per pizza
sized box, and I knew that there is no true parallelism here with the NXT :)
I like your design, because it seems more accurate because it grabs the time at
which the system sees the touch sensor pressed. One point of inaccuracy due to
lack of parallelism.
My solution has two points: one at recording the button was pressed, and the
other in the loop deciding who got what place. For example if software just
checked lane 4 to see if it finished, and then lane 4 finishes, then lane 3
finishes, and software was busy checking lane 1 then 2, it could incorrectly
report lane 3 as placing before lane 4. It all depends on how quick the loop is
(I have no idea!)
Kevin
|
|
Message has 1 Reply: | | Re: NXT Newbie "Is it possible" question
|
| (...) Well, I've built a 2 sensor version of Brian's idea using parallel sequence bars (I tried your idea Kevin, got stuck, then Brian chimed in). I just did some testing by building a rig to press the 2 sensors "simultaneously." I was able to get (...) (14 years ago, 26-Aug-10, to lugnet.robotics, lugnet.technic)
|
Message is in Reply To:
| | Re: NXT Newbie "Is it possible" question
|
| (...) Well, just for diversity here's a slightly different approach. Make the first block a "Reset Timer" block, then split the program into four sequences. Each is simply a "Wait for Touch Sensor", followed by "Read Timer" block with the result (...) (14 years ago, 24-Aug-10, to lugnet.robotics.nxt)
|
9 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
|
|
|
Active threads in Robotics
|
|
|
|