Exercises
These exercises can improve your robot and let you practice your skills:
- You have been able to get readings and a count for each wheel when driving for a fixed time. How could you make code that stops the motors after a fixed number of counts? You may need to check the encoder readings in a loop regularly.
- You may have noticed imbalances in the counts – this is normal and due to motor and wheel differences. One way you could improve this would be to design and make a holder for the breadboard with the styrene rod so that it doesn’t slide around on the platform.
- Could you write code to slow a motor if it’s overtaken another one in its count?