I am trying to make a Lego play piano from ev3, where I have connected two arms to a single motor on either side using Lego elements. Both the arms move counter clockwise to one another (if one plays the key then another won't), the problem is that I need one of the arms to double tap on the key without the motor moving 360 degrees. How do I do it? I have used run_time, run_target and run_angle but nothing seems to work.

this is not the picture of my product but i assembled it by watching this video. Therefore, the assembly is similar

this is the code

  • 1
    If I understand correctly, you can already tap once. What is preventing you from repeating the same movement in order to tap twice?
    – zovits
    Jan 29 '20 at 8:35
  • 6
    Please don 't upload code as a picture. Feb 6 '20 at 18:21
  • This is actually quite simple. Turn the motor enough degrees for it to touch the key, then use that same number of degrees to turn it back (but with a - before it to specify that it go backwards. After that, turn it that same number of degrees again but without the - this time. May 18 '20 at 20:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.