Subject:
|
Re: why doesn't this work?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Tue, 30 Nov 2004 22:33:42 GMT
|
Viewed:
|
1106 times
|
| |
| |
> In lugnet.robotics, Steve Hassenplug wrote:
>
> > What is the value of inc when you're done?
>
> 2000
I think that means for the first 27 times through the loop, the value for SENSOR_1
changes every time. So all the values would be 0 or 1.
Instead of storing the timeout, try creating a seperate counter that's incromented
each time through the loop, and store that in the array. It may turn out to be a
sequence of numbers.
I think the program is working.
Steve
|
|
Message has 1 Reply: | | Re: why doesn't this work?
|
| (...) Your exactly right, the results are a sequence 1-20, meaning that it takes 20 sensor changes to go from full speed to stop. The rest of the array is zero's as it should be, so the program works perfectly. I'm amazed though that the rotation (...) (20 years ago, 30-Nov-04, to lugnet.robotics)
|
Message is in Reply To:
| | Re: why doesn't this work?
|
| (...) 2000 (...) Yes (it shows up fine on the watch graph) Steve here's the whole program #define TRUE 1 #define FALSE 0 int Vvariable; int Aforward=1; int speed; int maxspeed=0; int timeout=0; int array[27]; task main() { //start speedcontrol; (...) (20 years ago, 30-Nov-04, to lugnet.robotics)
|
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
|
|
|
|