Subject:
|
Re: TachoSpeed.nqc
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Mon, 12 Mar 2007 15:27:11 GMT
|
Viewed:
|
3920 times
|
| |
| |
In lugnet.robotics, linmix <linmix@gmail.com> wrote:
> When the TachoSpeed reported by watching the brick is around 57, the
> brick doesn't do anything if the response value is set to 62. It does at
> 66 or 67 but that also makes it impossible to negotiate a slope because
> the inclinations also makes the TachoCount value drop and the brick
> turns around
I don't really understand what you mean when you say "the brick doesn't do
anything". Can you be more specific?
> Am I right in thinking that if both Tachospeed (OUT_L) and Tachospeed
> (OUT_R) drop below the threshold value the first 'if ' is more likely to
> be executed?
They will both be executed in sequence if at the time the second if statement
reads the TachoSpeed setting on OUT_L it happens to be below the threshold
setting. If you described exactly what you are trying to make the robot do it
might be easier for both of us to figure out what is going wrong. You may want
to try letting your robot get up to speed outside of your while loop and then
get rid of the 2/10s a second wait and OnFwd call at the start of the while
loop. Perhaps you should make the two if statements into a single if/else
statement instead.
John Hansen
|
|
Message has 1 Reply: | | Re: TachoSpeed.nqc
|
| (...) Sorry. I meant to say 'the brick never executes the if statement'. (...) I don't see 1) how I could make an if/else statement or 2) what the benefit would be. 1) If I make an if/else statement isn't 'else' executed always if 'if' is not true? (...) (18 years ago, 12-Mar-07, to lugnet.robotics)
|
Message is in Reply To:
| | Re: TachoSpeed.nqc
|
| (...) I 've done just that, but the problem I describe persists: When the TachoSpeed reported by watching the brick is around 57, the brick doesn't do anything if the response value is set to 62. It does at 66 or 67 but that also makes it impossible (...) (18 years ago, 12-Mar-07, to lugnet.robotics)
|
13 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
|
|
|
|