u4099 created page: Lesson4Week6 authored by Daniel Jung Moltzen's avatar Daniel Jung Moltzen
...@@ -148,6 +148,10 @@ public class PIDCarController { ...@@ -148,6 +148,10 @@ public class PIDCarController {
int derivative = 0; int derivative = 0;
int error = 0; int error = 0;
int turn; int turn;
// Calibrate the black/white threshold
sensor.calibrate();
offset = sensor.blackWhiteThreshold();
LCD.clear(); LCD.clear();
LCD.drawString("Light: ", 0, 2); LCD.drawString("Light: ", 0, 2);
... ...
......