moveTo in MeEncoderNew


#1

Why are the parameters in the moveTo methode MeEncoderNew (angle and speed) and not (x,y). To my knowledge a point in 2D space is given by (x, y).
I’am trying top program a robot which drives to a known target in space and avoids obstacles which are in its path in its path.


#2

Hi Aant,

The (x,y) only gives the direction but not speed. Actually, with the (angle, speed) , not only can you set the direction, but also, you can set modify the speed for the encoder motor. Our engineer write this program base on the datasheet of the encoder motor chipset. I think you can calculate its position with the parameter angle and speed.


#3

Hi tec,

Is angle the number of turns the wheel makes?


#4

Hi Aant,

Here is a link which provide detailed explanation for the program in the makeblock library to you for reference: http://learn.makeblock.com/cn/Makeblock-library-for-Arduino/files.html


#5