uArm Play Music With Toy Piano

Recently, we made a use-case that let uArm to play music on a toy piano.


Here is the final video

If you want to play uArm as what we do, first you need,

a table / uarm/ and a toy piano



Step 1: Getting the Materials

  • uArm Metal version or Acrylic version (view our official website)
  • a toy piano with toy drumstick (any children piano from ebay)
  • a flat table

Step 2: Hitting different point

  1.     Before letting your uArm to play a music song, uArm should know each key of the piano.
  2.     So, by for each hitting point (x, y, z), using uarm.calAngles(x,y,z) to find 4 angles of servos which will be executed
  3.     Then, use uarm.writeAngle(uarm.getTheta1(), uarm.getTheta2(), uarm.getTheta3(), uarm.getTheta1()+theta4Offset) to execute 4 angles of servos in uArm immediately.
  4.     Four each hitting process, the end-effector should move above the hit point in advance and then quickly move downwards and upwards once. So this would make a “hit” process.

Then, you should let uArm to hit 7 different point in the air, like the video below:


Step 3: Place toy piano and find hitting points on the piano

  1. Then, put the piano before uArm, and get the coordinate of each point which will be hit.
  2. In this case, there are 7 points can be hit.


Finally, find a music score or book and code uArm in Arduino, then you will listen the music uArm PLAY!



All  code are free to download, checkout this link to download the source code / uarm library UCP /  example/ hitPoint

You can also check our Youtube channel to see what are we doing now~

  • before playing music with uArm, remember you have calibrated uArm in the latest way, check this website below to calibrate uArm and use all new APIs .



No Comments

Leave a Comment