Inertial Sensor Coding Help

Hi all. I am wondering if there is a way to use the inertial sensor, to help with turning, and staying straight during auton. Does anyone know how to do this? i have not seen how to do it using an example, but I did not see one for it.

How do you think this would work? Ask yourself:

  • What information do I need to have my robot drive straight?
  • What information does the inertial sensor provide?
  • When my robot “veers to the left”, what should I tell it to do?
  • How do I know when my robot “veers to the left”?
  • When my robot “veers to the right”, what should I tell it to do?
  • How do I know when my robot “veers to the right”?
4 Likes