Hi All
My team wants to turn robot and go X distance after turn x degrees in Autonomous. I do not have a lot of experience with this, but I am trying to help. I am using LabView, sinc eI am not a programmer and it is easy to use.
I connected Gyro and Digital Encoder on shaft for distance. I have both working in LabView Examples, cut and paste into Autonomous. I am using driver station input to determine if they go left or right, this is working.
Having trouble with code, start by turning robot using Gyro. They are using tank drive, making it more difficult to steer.
Example, start turning left until Gyro reaches 30degrees and stop… used select cases to start slowing down motor when gets close, this code is getting ugly… I looked into PID examples, having hard to to get this to apply.
Doe anyone have sample code they can send?
Alos, after reach 30%, go straight for x feet, I rset Gyro when get there to try and keep robot straigt until encoder reahes distance, not experience enough to have this code working well… does any one have sample code to use gyro keep staright and start slowing robot when encoder getting close to desired distance.
Greatly appreciate support