Arduino-Library-Button icon indicating copy to clipboard operation
Arduino-Library-Button copied to clipboard

This is a library for adding buttons to Arduino projects. It supports events like OnPress and OnRelease.

Results 6 Arduino-Library-Button issues
Sort by recently updated
recently updated
newest added

hi how to get just one output onPress or DoubleClick? so I could read the same button is clicked once or double? if I use simply your library and choose...

These names are reserved for compiler and their usage leads to undefined behavior. Your library just is not guaranteed to work.

Instead of `````` //---------------------------------------------------- onPress bool Button::onPress(void){ return _justPressed; }  //------------------------------------------------ overload  bool Button::onPress(bool refreshPinData){ if (refreshPinData) {  listen(); return onPress(); } else { return onPress(); }...

Please use tabulations or spaces but newer use both. This makes you code absolutely unreadable. Or pull https://github.com/carlynorama/Arduino-Library-Button/pull/3

Please don't write like this: if (_justPressed) {  _pToggleFlag ? _pToggleFlag=false : _pToggleFlag=true;  } Write like this: _pToggleFlag = !_pToggleFlag; It is much faster and much more readable....

I'd like to see an option when you initialize a button you can enable the internal pull-up resistor. Something like Button MyPushButton = Button(9, LOW, true); Where the 3rd parameter...