Your question is a bit confusing. Are you trying to get code that will make the drive turn x degrees when called? Like
turnDegrees(45); // turns 45 degrees clockwise
Also, if you’re looking for help on rotations, you’re going to need a gyroscope (https://www.vexrobotics.com/276-2333.html)
This should still be compatible with v5 come August.
Your question is a bit confusing. Are you trying to get code that will make the drive turn x degrees when called? Like
turnDegrees(45); // turns 45 degrees clockwise
Also, if you’re looking for help on rotations, you’re going to need a gyroscope (https://www.vexrobotics.com/276-2333.html)
This should still be compatible with v5 come August.
You don’t need potentiometers on your drivetrain, those have a rotation limit of 270 degrees. However, if you mean shaft encoders, then yes you would need those for that command to work. You don’t need a gyroscope unless you are trying to measure the robot’s rotation, that is, in degrees. This is really only useful for turning accurately.
I think he was looking into wheel rotations, not robot rotation. For wheel rotation you would need quadratic encoders or integrated motor encoders, though with v4 the quads are more accurate.
You only need one encoder for it to work, I recommend you use two on each side or one on a free spinning wheel.
However, if you are using a holonomic drive, then you would need on on each motor.
Your second question was not very specific, so I’m going to give it my best shot:
To apply this to your code, first plug both wires into digital ports. Then set up the sensor by selection the two ports that you want to use. To call this value in your code, simply use SensorValue(encodername).
V5 doesn’t ship till August. As last year was his first year, he may not be using V5 next season. I know my program isn’t going to be able to afford all of it immediately.