Go to Post Gracious Professionalism at its finest - Competing like CRAZY on the field, then working together like professionals off the field to make these events the best they can be for everyone involved. - Stu Bloom [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 12-02-2008, 09:53
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 588
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: gyro not working

Quote:
Originally Posted by johnsmith11111 View Post
I'm programming in easy-C with a gyro. I had a simple autonomous function initialize the gyro, wait 1200 milliseconds, start the gyro, then go to a loop where it got the gyro value and printed it to screen. No matter how I turned the gyro, it only gave a readout of zero. I then downloaded the same code but without the 1.2 second wait, and it worked fine. When I try to embed this code into the rest of my autonomous code, it does not work. Can anyone help me?
That's a little confusing. The Initialize routine actually waits until the robot has been turned on for a second (settling time for vibration), then it does a one second calibration where it computes the average non-moving value. So you shouldn't need to 1.2 second wait.

I'm not sure why adding it changes anything, but you can look at a pretty simple sample program here that does work:
http://users.wpi.edu/~bamiller/WPILib/Samples.html

Please let us know if you find a bug in something that is causing your problem.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
 


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
Subscriptions not working? Jeff Waegelin CD Forum Support 2 07-02-2007 14:11
Gyro not working in Autonomous? kaszeta Programming 7 11-02-2006 01:28
CMUCam not working Inverted Programming 10 04-02-2005 19:32
Radios not working... E Jones 234 Control System 3 21-01-2005 21:58
Radios not working... E Jones 234 Electrical 3 21-01-2005 21:58


All times are GMT -5. The time now is 09:59.

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