Let's record the values of the Gyro Sensor while the robot is moving and is trying to keep its orientation straight. This is an interesting experiment and we will have to use file access to write the values to a file.
- 10 Jan 2018
- LEGO MINDSTORMS
- Experiment, EV3, Gyro Sensor, Sensors, Physics, FLL, Programming
- K.Mitov, I.Bozhilov
You can not implement an experiment where you plot the values of the gyro sensor and at the same time take its value and use it in a program. That's why we would have to use file access. The block for file access writes the value on a new line.
Analysis with LibreOffice
For plotting the values recorded in the file and for creating a chart from them we use LibreOffice Calc. You could give it a try.
What conclusion can you make from the values that are shown? What you could see from the graphic is that every time the robot makes a mistake and the gyro sensor detects, the program will steer the robot in the reverse direction.
The data log from the experiment when moving forward and keeping straight with an implementation for Proportional compensation.
Courses and lessons with this Tutorial
This Tutorial is used in the following courses and lessons