Hello guys, I’ve just jumped into the Arduino bandwagon recently . Glad to see much helpful threads around
Okay, so I have this project where I would need to integrate TCRT5000 (its an IR sensor) with 2 motors where when the IRs detect a black line/tape . The motor would stop and reverse back to another direction .
In short, the project is a robot which motor’s would turn away from the black tape detected via the TCRT5000 IR sensor and just move around the place which has no black tape.
I already have a partial code (for the motor and the sensor), I did not integrate everything yet . Is there any tips here on how should I integrate the IR sensor and the motor’s codes together ?
I know the if loop could be used, but I can’t think of a way to implement it, would be helpful if someone here gives me some examples on how to perform the coding .
Thanks alot guys !
2motor run.txt (1.5 KB)
newIR.txt (910 Bytes)