The Life of the Little Wild Omoplate

 

Birth
Lets follow the friendly little omoplate through the wild woods of configuration !
First the omoplate is born ..  awwe.. isn't he cute..

i01.startLeftArm(leftPort)

This little line starts the omoplate servo along with bicep, rotate, & shoulder Servos.  They are attached to the appropriate Arduino, connected to the correct pin on the left port.  Yay !  What a cute little omoplate..
After being born..  our little omoplate is ready to do our bidding.  

Safety - its a wild world out there

i01.leftArm.omoplate.setMinMax(110,150)

First we want to tell our little omoplate to be safe.  If it moves too far one way or the other, the little guy will break, or melt, and his little soul will leave in a poof of smoke ..  that would make us sad.  So we tell the omoplate NO MATTER WHAT YOUR TOLD BY OTHERS - NEVER GO BELOW 110 OR ABOVE 150 (in your real coordinates)!

Stay safe omoplate !

Translation

Other things will be talking and telling our omoplate what to do.  Do this ! Move here ! Stop here !  Some of these friends will be talking in different languages.  The Joystick can't count to 110, in fact the Joystick can't count past 1 !!!   The Joystick speaks "real numbers" between -1 and 1 ... strange little Joystick, no ?   So how can we get the Joystick to speak to our omoplate?   Easy - we tell the omoplate to Map !  map the Joystick output to  the desired range.

we might try :

i01.leftArm.omoplate.map(-1.0, 1.0, 110.0, 150.0)

this tells the omoplate when it's told to go to -1.0 .. it really means go to 110...  & when Joystick tells it to go to 1.0, the little omoplate should go to 150.0 ...   it will do that for all the values the Joystick can send between -1.0 & 1.0 ....  it map the Joystick Range of Numbers onto the Servo's Range of Numbers ... clever little omoplate.

InMoov Max had this mapping 

i01.leftArm.omoplate.map(0,180,110,150)

This can cause unwanted behavior - because the InMoov scripts tell the servos exactly where to go.  But this is saying the regular big 0 - 180 range should be "squished" to little 110 - 150 number range.  Big moves will become little moves. It would be ok if the scripts sent the omoplate to 0 or 180 .. but they never do.  The scripts were created with the omoplate in mind.  And they tell him "exactly" were to go.  If they went to high or too low - the omoplate should stil be safe.  But what happens with this "translation" is the script says exactly where to go ... but the omoplate thinks it should be translated into something "not as far"

And when Max is told to lower his arms .. he does this ;)
And that is the story of the little wild omoplate