Robot Not a Dev? Buy Now
Not a Dev?

Misty Community Forum

Misty Skill: Flips a pretend coin

Description: Misty pretends to flip a coin with right arm, and then watches it go up and back down and land in Mistys pretend hand. Then Misty states whether it is heads or tails. This is another take on the yesno API.

To generate the movements, I put the head in Compliant mode using Halt all Motors in the Command Center. Then scroll down to Sensor Data section and subscribe to Actuator Positions. Then, physically move Misty head to where I wanted to start, and move head to the path and points it needs to reach, recording the head position values in the code.

I then I tried only the important head positions, and plugged them in. Whatever interpolation method is used in the Misty firmware does most of the heavy lifting here. The resulting code is pretty simple, and only defines the important head positions.

Coin toss sound - slightly modified from website source in the code. I used Audacity to tweak it to be longer and no clunk at the end.

Still looking for a easy way to do a Misty voice. The Robot Voice Generator is what I used for this. Whatever setting I choose, I cannot get a good voice that I think matches what I think Misty should sound like. I tried to record just “Heads” and “Tails”, but this was not long enough and I would miss understanding what Misty was saying.

Special thanks: @piikoicoder, for the coin idea.

2 Likes