Quote:
Originally Posted by GuyM142
Ok, so for my needs continuous increase/decrease would be the best "convertion" of the gyro volts readings.
|
Would you mind sharing with us what you are trying to accomplish and how you determined that a continuous increase/decrease sensor output would be best?
Quote:
|
Now, the default code is giving me +/-180 degrees range...
|
Interesting. In Java, the gyro angle is returned as a continuous increase/decrease from the starting value:
Code:
/**
* Return the actual angle in degrees that the robot is currently facing.
*
* The angle is based on the current accumulator value corrected by the oversampling rate, the
* gyro type and the A/D calibration values.
* The angle is continuous, that is can go beyond 360 degrees. This make algorithms that wouldn't
* want to see a discontinuity in the gyro output as it sweeps past 0 on the second time around.
*
* @return the current heading of the robot in degrees. This heading is based on integration
* of the returned rate from the gyro.
*/
Quote:
|
I'd like to have a vi that gets X degrees as an input and moves the robot X degrees CW
|
Is there a reason you always want to rotate the robot clockwise? In other words, if "X" is 359 degrees wouldn't it be better to rotate the robot 1 degree counter-clockwise?