![]() |
gyro not working
I'm programming in easy-C with a gyro. I had a simple autonomous function initialize the gyro, wait 1200 milliseconds, start the gyro, then go to a loop where it got the gyro value and printed it to screen. No matter how I turned the gyro, it only gave a readout of zero. I then downloaded the same code but without the 1.2 second wait, and it worked fine. When I try to embed this code into the rest of my autonomous code, it does not work. Can anyone help me?
|
Re: gyro not working
Quote:
I'm not sure why adding it changes anything, but you can look at a pretty simple sample program here that does work: http://users.wpi.edu/~bamiller/WPILib/Samples.html Please let us know if you find a bug in something that is causing your problem. |
Re: gyro not working
Quote:
|
Re: gyro not working
Quote:
|
Re: gyro not working
well, there doesn't appear to be a short in our wires....
If we add a few lines of code in autonomous that initailize and start the gyro, then inside a whileloop that will be constantly running (While 1) that gets the gyro and prints it to screen, then the gyro works. For some reason, it is only working in this scenario, we have the same settings for the start and initalize, and the same port, it still does not work. This is very frustrating :mad: |
| All times are GMT -5. The time now is 09:59. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi