weilin
September 5, 2020, 6:53am
2
Please, take a look at these examples:
Description
The 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 direction and...
This procedure calibrates the accelerometers in the Inertial sensor and saves the result in non volatile memory.
This procedure needs vexos 1.0.10 or later.
Only perform this calibration if your VEX inertial sensor is showing angles for roll and/or pitch that are larger than perhaps 1 or 2 degrees when the inertial sensor is on a flat surface that is known to be level in both axis.
Some inertial sensors can show significant error for roll and pitch when placed on a level surface. To check a…
Pretty much the title… I’ve got an inertial sensor that I calibrate using this:
[image]
The issue is that this creates a two second delay when I open up auton-mode or user-control. How would I actually move calibration to pre_auton since the new Vexcode doesn’t create a pre_auton function.
Let us know if you could get started initializing and using inertial sensor. After you you do, the next step would be to add PID to control your turns using inertial sensor as the input.
I will be allocating this thread to answering any questions in regards to the tutorial
[C++ VEXCode V5 Text Tutorials - Autonomous PID and Multitasking]
Fair Warning: I am unsure if I have the positive and negative motor values correct, as this is all done on the top of my head. So If the robot is continuing to go even after the lateral position is reached, change
error = averagePosition - desiredValue;
to
error = desiredValue - averagePosition;
If the robot continues to go even a…
Yes rotation() is the correct function to call, you just need to remember its initial value before entering PID loop (see example here ).
Even more information here: Inertial sensor programming - #7 by weilin
6 Likes