Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Featured Replies

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.

 

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...

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...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links