Can you use "falling" outside an interrupt function? I am trying to wright my code so if a pin goes from high to low it performs a command but I'm not having any luck with it at the moment. Here is my code if you can help me out! Thanks!
I am having trouble figuring out where exactly to put the EstopVal = prevEstopVal; command as it seems to mess things up everywhere I've tried placing it. When the program starts the prevEstopVal is already set at LOW and the button will be HIGH.
schoolsterz123:
I am having trouble figuring out where exactly to put the EstopVal = prevEstopVal; command as it seems to mess things up everywhere I've tried placing it. When the program starts the prevEstopVal is already set at LOW and the button will be HIGH.
In the same scope as where you read the button state, but only after you are done comparing.