During the exploration, the team was required to create a program that allowed the CrayolaBot to use three optosensors to follow a straight line, and afterwards, a curved line. Additionally, the team was required to use shaft encoders to allow the robot to drive forward 14 inches, turn left 90 degrees, drive forward 10 inches, turn right 90 degrees, and finally drive forward 4 inches.
Testing for the triple optosensor setup on the straight line went smoothly, as the robot successfully followed the line on the first attempt. However, when the team tested the robot’s line following abilities on the curved line, it failed. This was due to the motors not adjusting their speeds quickly enough, causing the robot to completely lose the line. This was remedied by more dramatically decreasing and increasing certain motor speeds at the appropriate times. Because of this change, the robot successfully followed the curved line until the motor speed was drastically increased, causing the robot to simply drive straight over the line without adjusting at all.
For the shaft encoding segment of the exploration, the team calculated the distances the robot could travel in predetermined amounts of time and calculated the distance per second. Using this, two functions were created, one for driving straight and the other for turning a set amount of degrees. During the first test, the robot failed to turn the appropriate amounts and was not quite traveling the appropriate forward distances. The team decided that its measurements were not accurate enough and therefore redid them and took the averages to get more accurate calculations. During the next test, robot was acceptably close to the path it was required to take.