Mutila: Mouse's Utilities for Arduino
Oft-used utilities: debouncing buttons, averaging samples, and so on.
Public Member Functions | List of all members
AbstractButton Class Referenceabstract

#include <AbstractButton.h>

Inheritance diagram for AbstractButton:
Inheritance graph

Public Member Functions

 AbstractButton ()
 
virtual void begin ()
 
virtual bool on ()=0
 

Detailed Description

Abstract button class.

Abstracts out a thing with on and off states, without saying what might cause those states

Definition at line 10 of file AbstractButton.h.

Constructor & Destructor Documentation

◆ AbstractButton()

AbstractButton::AbstractButton ( )
inline

Constructor.

Definition at line 14 of file AbstractButton.h.

Member Function Documentation

◆ begin()

virtual void AbstractButton::begin ( )
inlinevirtual

Initialization.

It is typical to call the begin() method from the Arduino sketch's setup() function. This will call pinMode() for you, with arguments appropriate for the button logic type.

Reimplemented in AnalogInputButton, and DigitalInputButton.

Definition at line 23 of file AbstractButton.h.

Here is the caller graph for this function:

◆ on()

virtual bool AbstractButton::on ( )
pure virtual

Test instantaneous input state.

Returns
true if the button is pushed, else false.

Implemented in DebouncedButton, AnalogInputButton, DebouncedAnalogButton, DebouncedDualButton, DualInputButton, and DigitalInputButton.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: