LineCounter(line& sensor, bool throughPolycarb = false)
Constructs a LineCounter with the given line tracker sensor. If the line tracker is on the other side of polycarb, then set throughPolycarb to true. This is because the line tracker is less sensitive to reflectivity when it is on the other side of polycarb.
Parameters
sensor- The line tracker sensor to usethroughPolycarb- Whether the line tracker is on the other side of polycarb
Example
line tracker = line(Brain.ThreeWirePort.A);
LineCounter counter(tracker);