Go to Post Anyone riding a Segway looks cool...ask Andy Baker - Kyle Love [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 10-02-2009, 23:38
DtD's Avatar
DtD DtD is offline
I hope the watchdog starves!
AKA: Pathogen David
FRC #2410 (The Metal Mustangs (Merged from 2334, Hazmat Robotics))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Kansas
Posts: 86
DtD will become famous soon enoughDtD will become famous soon enough
Gyro won't work right =?

We decided that we were going to program an alternate plan for our Autonomous code, so I wrote some code and wired it up today...but I got some strange numbers.

The number was just a really long decimal that slowly incremented or decremented.

I'm thinking that the cable must just be soldered badly or something, but I ran out of time, and thought I should ask here so I don't waste too much time on Thursday.

Here is the code (stripped down really far
Code:
Gyro* gyro;//Declaration
gyro = new Gyro(1,1);//Inilization - In the robot startup
gyro->Reset();//In AutonomopusInit()

//Code in Autonomous Periodic - int countdown is just to keep the terminal from overflowing.
if (--countdown<=1)
{
 echo("Gyro Rotation: "<<gyro->GetAngle()<<" Degrees\n");
 countdown=50;
}
~DtD
Reply With Quote
  #2   Spotlight this post!  
Unread 11-02-2009, 00:05
wt200999's Avatar
wt200999 wt200999 is offline
Texas Instruments
AKA: Will Toth
FRC #3005 (Robochargers)
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2004
Location: Dallas, Texas
Posts: 325
wt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud ofwt200999 has much to be proud of
Send a message via MSN to wt200999
Re: Gyro won't work right =?

You have to set the sensitivity using Gyro::SetSensitivity() which you can find the sensitivity in the sensor manual on the us first site, (depending on the sensor you have)
__________________
Programming in LabVIEW? Try VI Snippets!

FIRST LEGO League 2004 - 2005
FRC Team 870 Student 2006 - 2009
FRC Team 3005 Mentor 2013 -
Reply With Quote
  #3   Spotlight this post!  
Unread 14-02-2009, 09:16
DtD's Avatar
DtD DtD is offline
I hope the watchdog starves!
AKA: Pathogen David
FRC #2410 (The Metal Mustangs (Merged from 2334, Hazmat Robotics))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Kansas
Posts: 86
DtD will become famous soon enoughDtD will become famous soon enough
Re: Gyro won't work right =?

Hmm, I thought it said that it was already set for the kit gyro, ah well. I will try that today! THanks!

~DtD
Reply With Quote
  #4   Spotlight this post!  
Unread 14-02-2009, 17:04
csshakka csshakka is offline
Registered User
FRC #0818
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Warren, MI
Posts: 21
csshakka is an unknown quantity at this point
Send a message via AIM to csshakka Send a message via MSN to csshakka
Re: Gyro won't work right =?

Quote:
Originally Posted by DtD View Post
The number was just a really long decimal that slowly incremented or decremented.
Ours did this as well and this was using LabView. Not sure exactly what it is, but we notice that when the wires are bunched up, it happens. We also find this happen when the gyro moves during program start up when it is trying to reset to a new zero position. When we hit run, the gyro dashboard rotation dial sits at the last angle measured, and then after like 3 seconds, it jumps to a zero position. If the gyro is bumped or rotated during this time, it continually moves.
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2009, 10:57
Phoenix Spud's Avatar
Phoenix Spud Phoenix Spud is offline
Everyone. Everywhere.
FRC #3132 (Thunder Down Under)
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2004
Location: Sydney, Australia
Posts: 703
Phoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond reputePhoenix Spud has a reputation beyond repute
Re: Gyro won't work right =?

The sensitivity for the KOP gyro is 0.007. We had the same problem until we used this number. Also you may want to use cout.

Hope this is helpful!!
__________________
Sarah Heimlich
Outreach Mentor | Business Mentor
FIRST® TEAM 3132
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
chicklet won't work bsbllpss Control System 3 05-02-2008 09:33
Warcraft won't work, don't knwo why John Gutmann Chit-Chat 2 27-07-2007 08:52
Encoder, GTS, Gyro, Camera != Work purduephotog Programming 1 18-02-2007 17:20
Major CMUcam issues - LabView app won't work, very low-quality picture scottmso Programming 5 19-01-2006 17:51
3D Studio Max won't work David the bomb 3D Animation and Competition 3 03-03-2004 17:12


All times are GMT -5. The time now is 14:52.

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