Go to Post Gatting your senior pic with robot = (Cool factor * infinity). :cool: - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-03-2016, 11:45
Andrew V's Avatar
Andrew V Andrew V is offline
Registered User
FRC #4678 (CyberCavs)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2013
Location: Ontario, Canada
Posts: 14
Andrew V is an unknown quantity at this point
SPI port gryo and accelerometer help

Does anyone know how to program the gyro that plugs into the SPI port of the roborio in java specifically this: http://firstchoicebyandymark.com/fc16-000

I've seen labview tutorials but none for java, any help would be appreciated, thanks.
  #2   Spotlight this post!  
Unread 20-03-2016, 11:50
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 159
nickbrickmaster is an unknown quantity at this point
Re: SPI port gryo and accelerometer help

Use the ADXRS450_Gyro class. Here's the source:

https://github.com/robotpy/allwpilib...S450_Gyro.java

Here's the docs:

http://first.wpi.edu/FRC/roborio/rel...S450_Gyro.html
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
  #3   Spotlight this post!  
Unread 20-03-2016, 14:31
bdaroz's Avatar
bdaroz bdaroz is offline
Programming Mentor
AKA: Brian Rozmierski
FRC #5881 (TVHS Dragons)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Albany, NY
Posts: 403
bdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud of
Re: SPI port gryo and accelerometer help

We found calibration to be key for this. Because of an awesome field reset team (we were very close to, or even ahead of schedule much of the time), and robots ready to go far more often than not, we were moving the robot in a powered up state. Our original plan was to plant the robot and THEN power it up as the FMS was reconfiguring. Thus the auto-calibration of the gyro should be sufficient.

In reality that didn't work so well. We ended up using a calibration command (Command-based robot) we could call when disabled to force the calibration before match start.

It seemed to significantly help with drift during our auto.
Closed Thread


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 00:38.

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