I just watched this video and i want to turn my drivetrain like this. Can anyone help me? I have an inertial sensor.
but i want to do with an inertial sensor, idk how should i program this sensor?
JcbMrgn
February 18, 2022, 3:22pm
4
Just replace the encoder values with inertial rotation values for the turning pid
do you have any tutorial videos or documents for the inertial sensor?
It’s pretty easy to do if you are using the Drivetrain. It is built into the Devices > Drivetrain configuration.
Description
The VEX V5 Inertial Sensor is a combination of a 3-axis (X, Y, and Z) accelerometer and a 3-axis gyroscope. The accelerometer will detect a change in motion (acceleration) in any direct...
If you are using VexCode Pro, you can use the following post as an example. It includes instructions for a six motor drivetrain but you can do it with two or four motors by adjusting the motor groups.
Here is some boilerplate code to get you started.
// Left Motors and motor group
motor leftMotorA = motor(PORT1, ratio18_1, false);
motor leftMotorB = motor(PORT2, ratio18_1, false);
motor leftMotorC = motor(PORT3, ratio18_1, false);
motor_group LeftDriveGroup = motor_group(leftMotorA, leftMotorB, leftMotorC);
// Right Motors and motor group
motor rightMotorA = motor(PORT11, ratio18_1, true);
motor rightMotorB = motor(PORT12, ratio18_1, true);
motor rightMotorC = motor(PORT13, ratio18_1, true)…
Got it! thanks for all this