Simple line finder


I give you three small pictures, some source code and three short youtube video’s of the line finder I made with makeblock today.

the front:

the back:

the bottom:

video of slow moving line finder (35 seconds):

video of fast moving line finder (24 seconds):

#include <Me_BaseShield.h>
#include <Me_BaseShieldMotorDriver.h>
#include <Me_LineFinder.h>

Me_BaseShieldMotorDriver baseShieldMotorDriver;
Me_LineFinder lineFinder(PORT_5); 

void setup()

void loop()
    int sensorState = lineFinder.readSensors();
    if(sensorState == S1_OUT_S2_IN)
    if(sensorState == S1_OUT_S2_OUT)


Thank you for your sharing Paul.

We also make a staff contest about the Line Finder robot last Saturday in our company and made a lot of fun by buiding, coding, testing and running it.


Hi! I noticed there and the line diameter(side to side) is real small. My mbot when goes in that line, it shakes alot.
Do you know how to fix it?