Gyro Suddenly stopped working?

Hi gusy so i was tuning the values for my pid and the gyro suddenly stopped working. Does anyone have any ideas, this is the only gyro we have and almost all our auto is based from a gyro. Does anyone have any ideas. Please help!!

Please help if you know whats happening. Our provincial comp is coming up and like i said before our auto turns and drive is from the gyro. So without a gyro we are in trouble. Please Help!!

What platform are you using? V5 or Cortex?

The platform we are using is v5 and coding in c

any ideas from anyone?

I cannot help with this very much, but I have a few pretty easy things you could do if you haven’t already.
1.) Switch ports for your gyro.
2.) Check gyro prongs and see if they are bent.
3.) Make program that reads values of gyro to see whether or not it is a drifting problem.

I hope this helps and you do well in your tournament!

1 Like

The way i am reading and initializing a gyro is like this image

  1. I tried that and the value is still going up slowly
  2. They dont seem that bent
  3. I did and the photo is below

It still isnt working!!

What are the values you’re seeing printed?

it usually starts from -.958364 and then starts going down slowly but now its going up really fast and i changed nothing but the port. @edjubuh

The gyro requires a couple seconds of calibration when it starts. Are you leaving it completely still when the program starts?

Yes i am keeping it completely still. @edjubuh

I’m not sure what’s going on then. The gyro driver is implemented in VEX firmware and not by PROS. What do the values look like if you configure the gyro as an analog input and print the readings?

arent the gyro values already in analog input? @edjubuh

Try a wire that is shorter than the 8 inch one you are using now, it is worth a shot.

i will when i get back to school i dont have a wire on me right now

If you meant doing it like this printf("sensor: %d\n", adi_analog_read(gyro)); then it gives me a value of 2147483647. @edjubuh

That would be the designated constant for PROS_ERR. add another printf right after: printf("error: %d\n", errno);

Now i am getting this image @edjubuh

@edjubuh do you have any idea why this is happening?