Datasheet

Flyport Wi-Fi and Ethernet Programmer's guide framework 2.3 (rev 1.0) www.openpicus.com
Example:
if(IOButtonState (p5) == pressed)
{
// Code to do when p5 is pressed...
}
else
{
// Code to do when p5 is not pressed...
}
To know what kind of value you have to substitute instead of pressed in the above example, check
the table above. In the case of an “inup” resistor substitute “OFF” (that is a low voltage level). In the
case of an “indown” resistor substitute “ON” (that is a high voltage level).
A frequent problem related to buttons and switches is bouncing of the signal.
This problem is generated by mechanical issues with the internal contacts of buttons and switches
but with a small amount of software, problems with bounce can be solved.
The IOButtonState has an integrated de-bounce feature, so you don't have to worry about this
problem.
The results will be filtered with a 20ms filter:
if the input value changes in less than 20ms, the result will not be valid
if the input value remains the same over20ms, the result will be valid
14