View Single Post
  #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