Turn Rate gyro stabalizing help

Hello I am trying to make a program to make our tank drive robot drive straight however I have two add followers errors in the code I need to resolve we are using a navx2 gyro.

The CANSparkMax object doesn’t have an “addFollower” method. Looking at the API documentation it should be just .follow(CANSparkMax leader)
https://codedocs.revrobotics.com/java/com/revrobotics/cansparkbase#follow(com.revrobotics.CANSparkBase)

For the code in your image, it would need to be updated to the following.

leftrear.follow(leftfront);
roghtrear.follow(rightfront);
1 Like

thank you so much dude your awesome.