void gridMovementSetup() { // Configure the pins used for the line sensors. lineSensors.initFiveSensors(); // Set up custom characters on the LCD so we can show a bar // graph of the sensor readings after calibration. loadCustomCharacters(); // Calibrate the gyro and show readings from it until the user // presses button A. turnSensorSetup(); // Calibrate the sensors by turning left and right, and show // readings from it until the user presses A again. lineSensorSetup(); }
void setup(){ //Initialization Serial.begin(9600); Wire.begin(); pinMode(13, OUTPUT); digitalWrite(13, HIGH); turnSensorSetup(); Serial.println("Press button to start calibration..."); button.waitForButton(); motion.setupReflectanceSensors(); Serial.println("Calibrated. Press button to start..."); button.waitForButton(); digitalWrite(13, LOW); }