Go to Post Finish... what an interesting concept. I'm still hoping to do that to our 2003 bot. - Joshua May [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
  #2   Spotlight this post!  
Unread 20-01-2017, 12:15
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 108
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: I2C Andymark Gyro Constructor

We have used an ITG-3200 based sensor. This is not the exact AM-2134 model you are describing, but it uses the same chipset for gyro measurements.

It was a non-trivial exercise to get angle information out of this sensor to our robot Java code. We ended up using a background thread that kept reading and accumulating values from the sensor. The ITG-3200 sensor provides deg/sec measurements that you have to integrate (accumulate) over time if you want to get degrees.

We have some Java source code available for the ITG-3200 using an I2C chip out at github that you are welcome to look at, use, modify or experiment with:

https://github.com/frc868/lib-robot/...o/ITG3200.java

We have not used the ITG-3200 sensor for the past couple of seasons. We switched a BNO059 sensor from Adafruit that does the accumulation onboard. We have not decided what we will use this year yet. Here is a link to that sensor

https://www.adafruit.com/products/2472

WARNING: Neither of these sensors are directly supported in the standard robot libraries.

It takes a considerable amount of time to connect custom I2C circuits to the roboRIO and read through the data sheets and then create the Java code to make use of them. It's a great and often painful experience for both kids and mentors.

If you do not have a Java and electronics expert on your team, you might be better off in looking for a Gyro that is already supported.

Good luck.
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 13:15.

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