Posted April 5, 20177 yr 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.
April 5, 20177 yr Simplest idea might be doing the condition twice (duplicating the condition you currently have).
April 6, 20177 yr 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.
April 15, 20177 yr Here is a much simpler way: (wait for button press)-(wait for button release)-(wait for button press)-(start motor) Easy! 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.