Easyuino
1.2.0
|
Button API offers an interface to interact with common buttons. More...
#include <Button.h>
Public Member Functions | |
Button (IN uint8_t buttonPin) | |
Constructor. More... | |
~Button () | |
Destructor. | |
bool | begin () |
Used to put the device ready to receive requests. More... | |
void | end () |
Used to stop the device API. More... | |
bool | isPressed () |
Verifies if the button is pressed. More... | |
unsigned long | getPressedTimeMilliseconds () |
Return the the time since it is being pressed. More... | |
unsigned int | getPressedTimeSeconds () |
Return the the time since it is being pressed. More... | |
![]() | |
Device () | |
Constructor called by every sub-classes. | |
~Device () | |
Destroy all the resources associated with the device. | |
bool | isInitialized () const |
Verify is the device is initialized and ready to use. More... | |
Additional Inherited Members | |
![]() | |
bool | _isInitialized |
Used to know if the device API is initialized and ready to receive requests. | |
Button API offers an interface to interact with common buttons.
Easyuino::Button::Button | ( | IN uint8_t | buttonPin | ) |
Constructor.
buttonPin | Arduino pin that is connected to button pin |
|
virtual |
Used to put the device ready to receive requests.
Normally this have some default behaviour some devices have other overload method with same name that receives other arguments to device customization.
Implements Easyuino::Device.
|
virtual |
Used to stop the device API.
After this the the device will not process API requests.
Implements Easyuino::Device.
unsigned long Easyuino::Button::getPressedTimeMilliseconds | ( | ) |
Return the the time since it is being pressed.
unsigned int Easyuino::Button::getPressedTimeSeconds | ( | ) |
Return the the time since it is being pressed.
bool Easyuino::Button::isPressed | ( | ) |
Verifies if the button is pressed.