"map" problem

for some reason MRL1107 seems to be unable to handle

i01.leftArm.rotate.map(40,180,155,20)

so i need to map it and change direction in another way.

it would be nice if i could get some help.

Mats's picture

Mapping problem

Hi Markus

Switch the order of the mapping parameters, so that the two last parameters come in min / max order.

And change the two first parameters so that you still get the same mapping.

For example:

i01.leftArm.rotate.map(40,180,155,20)

Change to

i01.leftArm.rotate.map(180,40,20,155)

 

Markus's picture

HmmmNow they are in the

Hmmm Now they are in the correct position but I can't move them with the sliders in the servo tab.

or in any other way for that matter

Mats's picture

Updated mapping

Hi Markus.

I have changed MRL, so that it now handles parameters in the order that you have used from the start. Please download the latest version and try your script again.

/Mats

Markus's picture

Okej I will test it tomorrow

Okej
I will test it tomorrow when I get home from work

Markus's picture

WooooHoooo!   the mapping is

WooooHoooo!

 

the mapping is working now thank you very much Mats