Mblock Ultimate 2.0 line following


#1

I am currently making a line following robot using the Makeblock ultimate 2.0 kit. i am having a lot of trouble writing a code to make the robot follow lines and take turns, any help would be much appreciated. Thank you.


#2

Please post the code you tried so far.
You might also try to run the code in Arduino mode to check if there is a performance problem.


#3

here is two examples of what i have tried out, thank you !!


#4

Also i think i have been running it through arduino mode :slight_smile: when the sensor goes on black it reverses and goes forward to try and correct itself, but it doesnt work very well. Thank you in advice


#5

Hm your coding seems a bit complex. I am too tired today to analyze what is the trouble here.
My coding here works fine for the mBot … you might need to tune it for your board, but you get the idea … it does not need to be more complex than that.


#6

Thank you so much!! i will try it out and let you know how it works :slight_smile:


#7

Also what does the “ir remote A pressed” do?
Thanks again.


#8

It stops the bot when you press A on the remote control


#9

I see, we have to make it work without a remote, it has to sense the line and then start going forward


#10