Go to Post (i would watch out for those jag's if i were you) - Scott Bahl [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

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-11-2012, 09:03 PM
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
I need help wiring and programming a Gyro

Hey CD
Our team has decided to use a gyro, for the very first time

and i was wondering, if your guys can help me out of how to wire and program gyro in Java.

Much Thanks in advance
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote
  #2   Spotlight this post!  
Unread 11-11-2012, 09:34 PM
F22Rapture's Avatar
F22Rapture F22Rapture is offline
College Student, Mentor
AKA: Daniel A
FRC #3737 (4H Rotoraptors)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Goldsboro, NC
Posts: 476
F22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant futureF22Rapture has a brilliant future
Re: I need help wiring and programming a Gyro

Some explanation and example code in C++ and Java (pages 19-20) here:

http://www.wbrobotics.com/attachment...%20Guide. pdf

Wiring is covered here:

http://www.usfirst.org/sites/default...meter-Gyro.pdf
__________________
Research is what I’m doing when I don’t know what I’m doing.
- Wernher von Braun
Attending: Raleigh NC Regional
Reply With Quote
  #3   Spotlight this post!  
Unread 11-12-2012, 07:45 AM
2185Bilal's Avatar
2185Bilal 2185Bilal is offline
Driver, Ld. Programmer, Electrical
AKA: Bilal Majeed
FRC #2185 (Ramazoidz)
Team Role: Programmer
 
Join Date: Feb 2012
Rookie Year: 2011
Location: Toronto, Canada
Posts: 110
2185Bilal will become famous soon enough
Thumbs up Re: I need help wiring and programming a Gyro

Okay i understand how to program it, but please could someone expand on how to wire it.
Cuz i did not understand much from the document posted above
__________________
RAMAZOIDZ

2009 Toronto West Regional - Regional Winners
2009 Waterloo Regional - Regional Winners
Reply With Quote
  #4   Spotlight this post!  
Unread 11-12-2012, 05:21 PM
slijin's Avatar
slijin slijin is offline
Pockets
AKA: Samuel Lijin
FRC #0694 (StuyPulse)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York City
Posts: 537
slijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to beholdslijin is a splendid one to behold
Re: I need help wiring and programming a Gyro

The gyro is an analog sensor that measures angular acceleration (how fast the rate of turning is changing with respect to the location of the gyroscope). As such, the gyro is connected to the analog breakout board by 3 wires: power, power return, and signal. The signal line is a voltage between 0V and 5V scaled to the rate of angular acceleration; this is what the "rate" pin in the wiring guide refers to.

In the pinout guide, you'll also have noticed that there are two sets of pins - rate and temperature. Temperature is included because changes in temperature can affect the output of the sensor that measures angular acceleration, but in FRC its impact is largely negligible. The one you care about is rate, because that's the one that will let your code determine angular velocity (how fast you're turning) and angular position (what angle your bot is facing).

So as a summary: The gyro ties into the analog breakout board. The +5V goes to the (+) pin (for power), the GROUND to the (-) pin (for power return) and the RATE to the signal pin, to give you the actual sensor feedback.

If you didn't get your gyro from the KoP, double check to make sure that it's analog; if not and it's digital, you want to tie it to the digital I/O pins on the sidecar.
__________________

2010-12 CT Chairman's
2011 Galileo 5th seed
2010 NY Regional Winners
Reply With Quote
Reply


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 09:03 AM.

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