|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Off Season Experimentation
Try putting all of the drive vi's inside the case structure and leave the gyro vi out. And make sure that there is are no other drive vi's in your autonomous code.
|
|
#2
|
||||
|
||||
|
Re: Off Season Experimentation
you need to have the while loop stop once the angle >90, otherwise each while loop execution (to infinity) will pulse the motors. Notice how the Tank drive (0,-.8) is outside of the case structure. That means that regardless of what is going on with the gyro, it will always turn.
Forward as in straight? or forward as in continued to turn? |
|
#3
|
|||
|
|||
|
Re: Off Season Experimentation
What I mean as in "continues to drive forward" is that after the robot rotates the required 90 degrees(at least), it(the motors) still continue to run and causes the robot to drive forward non stop. I placed all the Drive vi inside the case structure and made the while loop stop when its true which is when the gyro angle is >=90. But I still remain having the same problem I indicated that I described at the beginning of my post.
|
|
#4
|
|||
|
|||
|
Re: Off Season Experimentation
Personally, I'd place a probe on the angle. Perhaps it would help to place a breakpoint where the motors are zeroed.
The other thing to watch for is other code updating the motors. You may want to search for the refnum name. Greg McKaskle |
|
#5
|
|||
|
|||
|
Re: Off Season Experimentation
It is not likely that not having a wait timer would cause the robot to not stop moving, but they are good to have. Also, before you enter the while loop you should reset the gyro, so that moving the robot around before you run the code won't make it go more or less than 90 degrees. Another thing you should check is to see if turning in the direction you are telling the robot to turn in gives you a negative angle, like -90 degrees.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|