Here is our code:
We had to play around with our code a bit, adjusting the delay, difference between the speeds of the wheels, and whether if turned left or right when it went off the line.
We then used proportional control to keep the sciborg on the line. Doing proportional control was hard because we didn't know how to find a gain value but we were eventually able to by creating three ranges of values, one light, one dark, and one in-between.
We put an absolute value function around the error function to make sure the output values were always positive.



No comments:
Post a Comment