waiting for user input (button) to start
Neohaven
Posts: 13
what would a code to do this would be? i have alerady done a serial communication input wait, but i just seem to get stuck when im with input pins and all...
any help would be appreciated, thanks!
any help would be appreciated, thanks!
Comments
·· You could try:
This would wait until an active LOW button on P0 was pressed to continue.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
For BS1:
For BS2:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan
sry im a total noob (in ucontrol, that is...)
For example, when you click a switch there is 'noise' in the signal, which is a result of the physical 'bouncing' (for lack of a better word)- Keys on a keyboard need to be debounced as well....think of slamming a basketball down to the ground as hard as you can...there is, however small, an amount of bouncing...on smaller things like buttons and switches you (a human) can't see this, but electronics, much more sensitive and fast, do see these effects...
http://whatis.techtarget.com/definition/0,,sid9_gci214068,00.html
To debounce something means to make multiple 'spikes' be seen as a single edge event-
Ryan
With your index finger, the one next to your thumb [noparse]:)[/noparse] , press it to the side of your head at a slight angle just above your ear. Assuming you have hair, you will hear a crackling sound. When a switch is pressed, electronics hear the same thing in the switch but think it's the switch being pressed multiple times. The debounce tells the processor all that crackling is one press just like your brain tells you it's one finger pressing one time.
That should help clarify things a bit.