why does my tcrt5000 not detect white and black properly because when I raise my robot it only detects black and when I put it down it only detects white I want it to be able to detect white and black while moving but it doesn't happen . here's my code int OUT = 13; void setup(){ pinMode (OUT, INPUT); Serial.begin(9600); } void loop (){ bool sensorValue = digitalRead(OUT); if (sensorValue == 0){ Serial.print("Black"); } else (sensorValue == 1);{ Serial.print("White"); } }
For the first IR sensor, does it have to be in front of the leds to work or can it be to the side?
Which one is more quick
Sir which sensor is very accurate for line tracking?
Both are good
Which sensor is best for lfr?
Both sensors are good.
Sir 2nd one is not working how to solve it sir
Guide me sir
why does my tcrt5000 not detect white and black properly because when I raise my robot it only detects black and when I put it down it only detects white I want it to be able to detect white and black while moving but it doesn't happen . here's my code
int OUT = 13;
void setup(){
pinMode (OUT, INPUT);
Serial.begin(9600);
}
void loop (){
bool sensorValue = digitalRead(OUT);
if (sensorValue == 0){
Serial.print("Black");
}
else (sensorValue == 1);{
Serial.print("White");
}
}
Buddy increase the height of the sensor where it is mounted
I tried it's not working
Check my website srituhobby.com