Go to Post If the teams that are building exact replicas are inspired, who are we to say "You're being inspired all wrong?!" - Ian Curtis [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 08-02-2012, 17:24
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
How to make the Gyro work

Well after not being able to get the accelerometer to work, I'm going to try the gyro. But of course its not that easy. I just get a bunch of numbers that increment up. (Ex:2.97922e+087) Code and Pictures:

Code:
Gyro *gyro;
...
gyro = new Gyro (1);
...
gyro->Reset();
...
std::cout<<gyro->GetAngle()<<endl;
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2012, 17:30
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: How to make the Gyro work

Wait, am I looking at it correctly? It seems you are connecting to channel one of the analog bumper, but the analog bumper is inserted into the solenoid module. It also looks like your "solenoid bumper" is inserted into your analog module. In other words, you have swapped your analog and solenoid bumpers.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 08-02-2012, 17:40
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: How to make the Gyro work

Yep, came here to post that very thing... I got it working now... We totally know what we're doing...
Reply With Quote
  #4   Spotlight this post!  
Unread 08-02-2012, 22:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: How to make the Gyro work

Where did you get that cable you're using to connect the sensor to the Analog input pins? The wiring scheme is decidedly nonstandard, with power on the black wire and common on the red. That's likely to cause some confusion if you ever need to troubleshoot it.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-02-2012, 22:21
agartner01 agartner01 is offline
Captain + Control Sys & Design
FRC #4174
Team Role: Engineer
 
Join Date: Feb 2012
Rookie Year: 2012
Location: Hector MN
Posts: 109
agartner01 is an unknown quantity at this point
Re: How to make the Gyro work

Quote:
Originally Posted by Alan Anderson View Post
Where did you get that cable you're using to connect the sensor to the Analog input pins? The wiring scheme is decidedly nonstandard, with power on the black wire and common on the red. That's likely to cause some confusion if you ever need to troubleshoot it.
I got if from the KOP. It was the only f-f 3 pin cable.
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 13:34.

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