Go to Post ....a red-light-of-death. - Kevin Watson [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 10-02-2016, 03:25
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: ITG3200 Gyroscope

Our team used the ITG3200 last season. It was a challenge to work with due to the following:
  • We typically wanted our measurements in degrees and the sensor reports readings in degrees/second (we ended up using a thread to accumulate values reported by the sensor).
  • The sensor did not tend to report zero when sitting idle. This error (bias) needed to be determined at start up while the robot was stationary and then taken into consideration with each reading.

In any case, here is the code we came up with that worked reasonably well for the ITG-3200 when we wanted to detect if the robot was tipping or needed to perform an operation like "make a 90 degree turn":

https://github.com/frc868/2015-FRC-R...roItg3200.java

As far as the answer to your original question, I think you can use the following to convert the raw 16 bit values to degrees/second (not degrees):

Code:
rawAxisValue / 14.375 - axisBias
Where rawAxisValue is the 16 bit signed integer (short) read from the sensor for your z axis and axisBias is the average error reported by the axis when the robot is stationary (when you wish that the sensor reported 0 but discover it does not).

Good luck and I hope that helps.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi