Line Tracing Sensor

Hi! I am kinda new here! I bought myself a Gravity line sensor and tried using it but the serial monitor just keeps on giving me a 0 when i place it on a white or black surface. How do i fix this?

My program:

int mA1 = 4;
int mA2 = 5;
int mB1 = 6;
int mB2 = 7;
int sensor1 = 11;
int sensor2 = 12;
int buff1;
int buff2;
void setup() {
pinMode(mA1, OUTPUT);
pinMode(mA2, OUTPUT);
pinMode(mB1, OUTPUT);
pinMode(mB2, OUTPUT);
pinMode(sensor1, INPUT);
pinMode(sensor2, INPUT);

}

void loop() {
buff1 = digitalRead(sensor1);
buff2 = digitalRead(sensor2);

Serial.print(buff1);
Serial.println(buff2);
if ((buff1==1)&&(buff2==1))
go();

else if (buff1 == 0) {
back(30);
cl(20);

}

else if (buff2 == 0) {
back(30);
cr(20);
}

}

void go() {
digitalWrite(mA1, HIGH);
digitalWrite(mA2, HIGH);
digitalWrite(mB1, HIGH);
digitalWrite(mB2, HIGH);
delay(10);
stp();
delay(40);
}

void stp() {
digitalWrite(mA1, LOW);
digitalWrite(mA2, LOW);
digitalWrite(mB1, LOW);
digitalWrite(mB2, LOW);

}

void back (int spd) {
int a = 0;
while (a <= spd) {
digitalWrite(mA1, LOW);
digitalWrite(mA2, HIGH);
digitalWrite(mB1, HIGH);
digitalWrite(mB2, LOW);
delay(10);
stp();
delay(10);
a++;
}
}

void cl (int yow) {
int b = 0;
while (b <= yow) {
digitalWrite(mA1, LOW);
digitalWrite(mA2, LOW);
digitalWrite(mB1, HIGH);
digitalWrite(mB2, HIGH);
delay(10);
stp();
delay(30);
b++;
}
}

void cr (int lol) {
int c = 0;
while (c <= lol) {
digitalWrite(mA1, HIGH);
digitalWrite(mA2, HIGH);
digitalWrite(mB1, LOW);
digitalWrite(mB2, LOW);
delay(10);
stp();
delay(30);
c++;
}
}

Please use the Code tags. I suggest reviewing the "How to Use This Forum" sticky that is at the top of every subforum.

How to use this forum