mBlock for iPad: Line-Follower


mBlock for iPad: How can I query the Line-Finder Sensor 1 (Port 1) or Sensor 2 (Port 2)?
For mBlock for PC there is the block "Line Follower Sensor Port 1 (or Port 2).
Greetings Wolfgang


The iPad app does not have a block to query the left and right side of the line follower sensor.

However, there is a workaround: you can use the limit switch blocks instead.

The example code for mBot below uses the limit switch block to check the left and right side of the line follower sensor and lights the LEDs accordingly.

Line following in mblock android app
mBlock app "create" problems

Hi wowagner,

Some program blocks on mBlock has been processed which will be easier to use for children.
If you want to query the line follower sensor value by selecting different ports, you may try program for it with Makeblock APP.


@tech_support : that would work but:

  • children today are much more comfortable with tablets instead of PCs with a mouse
  • some households do not even own a PC any more
  • tablets are more mobile
  • Bluetooth connection is much more reliable with tablets compared to PCs (at least on Windows)

Some other vendors have a beginner and expert mode in their apps. You could move full line follower functionality (and other stuff too) into an expert mode.


Great, I’ll try it …
greetings Wolfgang


Thanks, can I have more information about the makeblock app?
greetings wolfgang


“Sie können die Funktion des Full Line Follower (und auch andere Dinge) in einen Expertenmodus versetzen.”
Thanks, can I have more information about the Expertenmodus?
greetings wolfgang


Thanks, can I have more information about the Expertenmodus?

That is not available, it was just a suggestion for the Makeblock team


Hi Andreas,

Actually, the Makeblock APP is for mobile devices like tablet.
For your suggestion on developing the export mode in one APP, we will share it with our APP team for reference. Thanks again.


Hi wowagner,

Here is the link with explanation of the Makeblock APP.


Great, I’ll deal with that.
greetings Wolfgang


Great, it works! Instead of the LED just add the movements …
Greetings Wolfgang


Thanks. Good workaround.


Hi Andreas,
if I use the corresponding movement blocks instead of the LED blocks, the mBot reacts too late to the signals of the line finder. Do you have a solution?
Greetings Wolfgang


That is the reason why Makeblock does not have it in this version of the app … it does not work reliably fast enough on mobile devices. AFAIK they plan to improve that.

Until then, you can try the following:

  • let the mBot drive as slowly as possible, 75 is the minimum speed which works
  • use gentle turns in the lines


Hi, thanks,
75 is still too fast!
How do “gentle turns” go?


Wide curves might help


Hello, I need your help, I try to create this whit limit switch, but in My cas appear limiswitch whit port, but whitout slot,

Only appear limit switch port2 is pressed

Thanks for you help


Which app / version do you use?


Maybe you can post some pictures and videos here?