Mbot2 line follow example program bug


#1

Hi - there’s a bug in the mbot2 line follow example program - I’ve posted about it in this post, however I have a separate question:
I’ve downloaded the ‘mBot2 Getting Started Activities V1.1’ pdf, and looked around elsewhere on makeblock sites, google etc - and I have found no other references as to how the ‘Kp line follow’ example app works, or where to begin to debug and fix the error (in the left power/right power section). The program itself has a note “I and D involve integral and differential knowledge, and have high requirements for mathematics, programming and hardware efficiency, which will not be expanded here”, which is pretty useless!
Has anyone here got any ideas/suggestions on how to fix the bug, or a link to a guide on how to build a correct, equivalent working app? The whole idea of the bot is learning, so a program that we cannot decipher or debug, without docs is a pretty bad starting point.

I should say, I’ve also updated the firmware to the latest version. So, alternatively - there’s a hardware issue in the Quad-RGB sensor.
Either way, I’m getting close to sending back the, and starting to fire off some honest reviews!


Mbot2 line-follow program wont turn right
#2

Hi there:

As you can see,base power = 30,kp is a fix value=0.8, about turn left power/turn right power*(-1)=Base Power-kp* RGB sensor 1* the deviation(Relative deviation degree of patrol line)

Take an example,If the degree is 50 degree then the turn left power will be base power-kp*50=30-40=-10,there is no negative force so it is turn left a little bit,and repeate the process,when the angle getting smaller the force will be smaller to keep the machine follow the line so as the right side

So this simple algorithm can work stably,if your machine can‘t turn left,it might be the problem of RGB sensor,if your product doesn’t exceed the warranty you can contact with distributor or seller to replace the component.if you have any problem feel free to contact with us,we’ll reply to ASAP.


#3

Thanks @makeblock.lindingxin
Is there a way to test the RGB sensor in isolation to confirm it’s faulty?
And, I’m afraid that explanation doesn’t help explain how the program works - is there a better, more full description - either course or tutorial?


#4

Hi:
You can use these block to test the RGB sensor,I guess one of them might have some problems and yes if you think it is too trouble to test it,it 's ok to contact with seller or distributor to replace the brand new machine for you

FYI:




#5

You’ve posted for the mbot there - this is an mbot2, for which there seems a serious lack of resources.
I’ve re-seated the Quad RGB sensor, however the example mbot2 program ‘KP Line Follow’ still doesnt fully work. I reckon there’s potentially bugs in it however - does it work out of the box for anyone else?

This is the Quad RGB sensor for the mbot2 btw:
https://education.makeblock.com/help/mbuild-quad-rgb-sensor/


#6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.