mBot line tracking problem


#1

Hello. We have a problem where our line tracking is not working. We are working on mBot2 robot for a competetion that is in two days, and at first our line tracking worked just fine but now it’s lagging and keeps going backward or sideways instead of actually going forward when it sees a black line. We need a code that will actually work.
for the quad rgb sensor, L1 and R1 are detedcting the blak line correctly, but still lagging. We also want the robot to not only walk on the edges but also go through middle lines (it is a grid floor), here is the arena as shown below:


the main idea is to follow the black lines and when it detedcts a red/blue object (using smart camera) it shoud grab it and continue following the black line until it finds the red/blue drop area.
the color detection is working fine, but the line following is the main issue.
Thank you.


#2

@janaa I wish I had time to just write code for you :blush:
I’m busy, though, so there any simple example programs I could send you so you can figure stuff out?