Go to Post One wouldn't want to keep the red herring in hand, that gets kind of stinky. - GaryVoshol [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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
  #1   Spotlight this post!  
Unread 20-03-2013, 00:22
zatch bell stev zatch bell stev is offline
Registered User
FRC #2523
 
Join Date: Jan 2012
Location: vermont
Posts: 14
zatch bell stev is an unknown quantity at this point
Gyro problem, please help!

Our gyro is not working properly. Gyro is connected to the analog breakout port 1 and signal is going to the output which is closer to the rate sign ( its not the temperature). We are running it through java.

when we enable the teleoperated mod it resets itself but its drifting the angle even when its stable. i already checked the sensitivity and its just multiplying with other numbers so when it turns it gives lower or higher numbers.At 0.007 i can get the degree for a while (around 10 sec)but it keep increasing even when i'm moving it. here is my simple code for it ...


package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Gyro;

import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Timer;


public class RobotTemplate extends SimpleRobot {

private Gyro gyro = new Gyro(1);

public void autonomous() {
}


public void operatorControl() {
double number1 = 0;

gyro.reset();

while (isEnabled() && isOperatorControl()) {
Timer.delay(0.05);

double number = gyro.getAngle();

System.out.println(number);

}
}


public void test() {
}
}

thanks for your helps.
 


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 12:36.

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