SECOND VERSION
Definition of the curvature as a variable c:
- Each time the mBot exit on the right side of the path (line follower sensor 1), motors are set to turn left and curvature is increased by 1. Similarly, when turning right it is decreased by 1.
- In its final configuration after program development and testing, The curvature is bound below 125 |c|<125 and when it overcomes 100 (|c|>100) the on board leds change colours accordingly to the curvature (red when turning left, green when turning right, blue while traveling forward).