Programming: ButtonPress Library Usage
Share
Using the buttonPress library for the Atmel AVR microcontroller. The function is called ButtonPressed and it returns a char for testing if the push button is actually pressed. The parameters are the button number, port where the button is connected, pin of the port where the button is connected, and the confidence level threshold.
Usage: char ButtonPressed(int buttonNumber, unsigned char pinOfButton, unsigned char portBit, int confidenceLevel) Example: if (ButtonPressed(0, PINB, 0, 100) { Code if the button is pressed... }