Line Follower sensor 1 always In


#1

My line follower sensor is not reading the sensor 1 correctly. It reads always IN.
Sensor 2 reads correctly IN and OUT.
however blue LED diodes on both sensors are working correctly. (PWR LED is ON)

Github version 3 library Makeblock-official/Makeblock-Libraries
examples/Me_LineFollower/TestLineFollower/TestLineFollower.ino (I am not able to post links)

MeLineFollower lineFinder(PORT_3); //Line Finder module can only be connected to PORT_3, PORT_4, PORT_5, PORT_6 of base shield.

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    int sensorState = lineFinder.readSensors();
    switch(sensorState)
    {
        case S1_IN_S2_IN:Serial.println("Sensor 1 and 2 are inside of black line");break;
        case S1_IN_S2_OUT:Serial.println("Sensor 2 is outside of black line");break;
        case S1_OUT_S2_IN:Serial.println("Sensor 1 is outside of black line");break;
        case S1_OUT_S2_OUT:Serial.println("Sensor 1 and 2 are outside of black line");break;
        default:break;
    }
    delay(200);
}

The example sketch only works for sensor 2. Sensor 1 is displayed as IN altough it is OUT. Even if the LED is ON.
Not sure if this is SW or HW related issue. I have tried different ports as well.


#2

Wrong include file. Resolved the same way as

(Replace MeOrion.h with MeMCore.h)


#3