Our goal was to program the Redbot to follow a black line while avoiding obstacles. In order to do this, we first programmed the bumper sensors on the front of the bot. The program modified the example code for the bumper sensors so that if both sensors were triggered, the bot would do a series of turns to go around an obstacle rather than just turning upon detection. We then used the example code to make the bot follow the black line using the infrared sensors on the front. The problems arose when we tried to combine the code. This is because the IR sensors need as little delay as possible to ensure that the sensors can keep track of the line. Since the bumper code required a delay to check for both triggers, the IR sensors were not able to keep up with the line. If given more time, the focus would be on writing the code in a way that allows the bumper sensors to function without interfering with the IR sensors.
On the left is a video of the Redbot following the line of Black electric tape.