Summary
In this chapter, we investigated the IMU and how we can use it to control the heading of our robot. We learned how to connect the device and calibrate it.
Then, we used data from it to face North by combining the sensor data with a PID controller. Finally, we built on this example so that it can turn a specified number from the current heading.
In the next chapter, we will build a small arena for the robot and look at how we can combine the encoders and distance sensors to estimate the robot’s position within this arena, improving its estimation as it moves.