So I’m trying to use a gyro to make a reliable, good autonomous but I can’t figure out the gyro. It’s so weird. I am using VCS, I’d like to be able to read the values and make accurate turns with the gyro because I am led to believe that it will highly increase consistency while pairing it up with encoders (I’ve heard a lot about PID loops but man that stuff is even more complicated, that’s a next year adventure). I’ve been reading abunch of past threads about the gyro and stuff and it’s all talking about jpearman and another jdude but when I tried one of their methods it completely locked up my program and nothing at all worked except static text appearing on my brain that was supposed to tell my gyro value. I understand that you’re supposed to start off by calibrating and then someone was talking about using analog units rather than rotationUnits and us rang12bit to maximize accuracy and then I kind of understand how to use it like
leftSpin(-50);
rightSpin(50);
while(Gyro.value(rotationUnits::deg) < 90){}
stop();
to do a 90 degree right turn hopefully.
If anyone can explain to me what I’m messing up or anything like just even pointing me in the right direction would be appreciated. Tomorrow is my last day to code and get my autonomous running in tip top shape for my last competition to qualify for state and I have a good chance with my new robot. Thank you all. (emoji for the badge)