Between the introduction to the project and the first in-class presentation, the team met once each week to construct our robot and to familiarize ourselves with arduino programming. As we did not have any code from previous classes to build upon, we began coding with the first challenge: line following. Our line follower, which we have provided together with the intersection detection component, is robust and yet moves quickly. This was the extent of our progress prior to the first presentation.
Following the first presentation, we made the aforementioned change to our design, i.e. changing the placement of the wheels. We also began working on the intersection detection challenge. For our testing, we defined an intersection to be a "cross"- or "T"-type intersection only. That is, in moving forward along a path, the robot is presented with a choice of moving either left or right (possibly all of left, right, and forward). The robot is intended to move forward if it encounters only a left or right path. This is because we did not want to address the issue of distinguishing a forced ninety degree turn from a "sideways T"-type intersection. The reason for this is that we encountered difficulty whenever we attempted to pass intersection detection to an auxiliary method. Such a method would inherently need to move forward to see if the center sensor moved off of the path or not. If it did, then the result is a forced ninety degree turn; otherwise, we would classify it as an intersection. The provided line follower code has been updated to handle "cross"- and "T"-intersections in the simplest way possible. That is, it simply stops when it encounters one.
Our attempts to meaningfully improve on this result consumed much of the time remaining in the semester. Our results were best when we coded each intersection case directly within the loop() method. This did not, however, often work out in practice. On any courses with shorter distances between turns, the robot would often miss an intersection entirely because of its angle of approach after leaving a previous turn. To this end, we concentrated our effort on centering the robot rather than simply correct for the center sensor having moved off of the path. This centering strategy was programatically cumbersome and yielded little improvement.
The decision was made very late in the semester to make a second structural change to the robot rather than to try to account for its shortcomings with excessively clever coding. To this end, we added two more LED/sensor pairs, altering the configuration to be that descibed in Design section. However, that design change was not succesful and we recommend for future team to invest in sensor modules that can be easily attached/adjusted as opposed to re-soldering individual elements on prototyping PCB board that as matter of fact is not good for multiple re-soldering attempts. This would allow easy testing of different scenarios as well as would save time (re-soldering a PCB board with 5 sensors takes few hours and you really would not have any desire to spend another few hours to solder everything back if you want to retract your design change).