Jump to content

Recommended Posts

Posted

Hello,

My son want to hit twice the left button to start a motor. Is it possible to program that? I try, but im not good.  I can do it with 1 hit on the button, but i don't know what to use for wait for 2 hits.

Can someone help me ?

Thanks.

 

Posted

Create a new variable set to 0. Inside a loop which reads the variable and ends if the variable = 2 put a switch block. If the switch detects the left button is pressed, read the variable block, add +1 then write back to the variable. The other option on the switch is set to default but is empty. Add a sound block after the loop for testing. You might need to put a wait block after the switch inside the loop set to 0.1 seconds.

  • 2 weeks later...
Posted

Here is a much simpler way:

(wait for button press)-(wait for button release)-(wait for button press)-(start motor)

Easy! :grin:

If you want I can make the program for you.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...