lib Modulove
Library for building custom scripts for Modulove modules.
All Classes Files Functions Variables Enumerations Pages
Public Types | Public Member Functions | List of all members
modulove::Button Class Reference

Public Types

enum  ButtonChange { CHANGE_UNCHANGED , CHANGE_PRESSED , CHANGE_RELEASED }
 Enum constants for active change in button state.
 

Public Member Functions

void Init (uint8_t pin)
 Initializes a CV Input object.
 
void Init (uint8_t pin, uint8_t led_pin)
 Initializes an Button paired with an LED.
 
void Process ()
 Read the state of the cv input.
 
ButtonChange Change ()
 Get the state change for the button.
 
bool On ()
 Current cv state represented as a bool.
 

Member Function Documentation

◆ Change()

ButtonChange modulove::Button::Change ( )
inline

Get the state change for the button.

Returns
ButtonChange

◆ Init() [1/2]

void modulove::Button::Init ( uint8_t  pin)
inline

Initializes a CV Input object.

Parameters
pingpio pin for the cv output.

◆ Init() [2/2]

void modulove::Button::Init ( uint8_t  pin,
uint8_t  led_pin 
)
inline

Initializes an Button paired with an LED.

Parameters
pingpio pin for the button input
led_pingpio pin for the LED

◆ On()

bool modulove::Button::On ( )
inline

Current cv state represented as a bool.

Returns
true if cv signal is high
false if cv signal is low

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