Programming: Push Button to Activate Code when Pressed and Released
How to make a program for the push button switch for an Atmel AVR microcontroller so that the action is only activated when the push button is pressed then released. A condition using the function bit_is_clear is used to test for the push button press and then a variable is used to determine pressed state and released state. Within the condition, there is another condition to determine if the push button is in the released state before the push button is pressed. This means that the push button must have been released before the push button pressed action is invoked.
Comments and Additional Information
Have some code to share? Or additional information? Respond here:
You need to be logged in to save a response on this page. The response must be constructive, helpful, supplimentary or to correct the existing video, code or narrative content.