User Tools

Site Tools


mosh:element_library:button

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mosh:element_library:button [2025/06/27 14:18] – [Setup Methods:] moshmosh:element_library:button [2025/06/30 15:38] (current) – [Runtime Methods:] mosh
Line 62: Line 62:
 Methods intended to be called during setup or initialization. These configure how the element behaves and are typically not changed during runtime. Methods intended to be called during setup or initialization. These configure how the element behaves and are typically not changed during runtime.
  
-|**Method**|**Direction**|**Required**|**Parameters**|**Description**| +|**Method**|**Direction**|**Required**|**Default**|**Parameters**|**Description**| 
-|setActiveLow(bool)|Write|❌|bool|Button is pressed when pulled low| +|setActiveLow(bool)|Write|❌|true|bool|Button is pressed when pulled low| 
-|setDebounce(uint16_t)|Write|❌|uint16_t|Set the debounce time in milliseconds| +|setDebounce(uint16_t)|Write|❌|10|uint16_t|Set the debounce time in milliseconds| 
-|setLongPressDelay(uint16_t)|Write|❌|uint16_t|Set the long-press delay in milliseconds| +|setLongPressDelay(uint16_t)|Write|❌|750|uint16_t|Set the long-press delay in milliseconds| 
-|setName(string)|Write|❌|string|Set a friendly name for the element| +|setName(string)|Write|❌|//null//|string|Set a friendly name for the element| 
-|setPin(uint8_t)|Write|✅|uint8_t|The pin the button is wired to| +|setPin(uint8_t)|Write|✅|//null//|uint8_t|The pin the button is wired to| 
-|setPressDelay(uint16_t)|Write|❌|uint16_t|Set the press delay in milliseconds| +|setPressDelay(uint16_t)|Write|❌|250|uint16_t|Set the press delay in milliseconds| 
-|setPullup(bool)|Write|❌|bool|Use the internal pullup| +|setPullup(bool)|Write|❌|true|bool|Use the internal pullup| 
-|setStreamOnPress(bool)|Write|c|bool|Button will send stream of PRESS events while active| +|setStreamOnPress(bool)|Write|❌|false|bool|Button will send stream of PRESS events while active| 
-|setStreamOnPressFreq(uint16_t)|Write|❌|Sets how frequently a PRESS event is sent during a press stream|+|setStreamOnPressFreq(uint16_t)|Write|❌|//null//|uint16_t|Sets how frequently a PRESS event is sent during a press stream|
 ====Runtime Methods: ==== ====Runtime Methods: ====
  
Line 77: Line 77:
 |buttonIsPressed()|Read|--|bool|Returns true if button is pressed, false if not| |buttonIsPressed()|Read|--|bool|Returns true if button is pressed, false if not|
 |getFriendlyName()|Read|--|string|Returns the friendly name of the element| |getFriendlyName()|Read|--|string|Returns the friendly name of the element|
-|getLastPropertyChange()|Read|--|uint32_t|get the amount of time (in millis) since the last state change)|+|getLastPropertyChange()|Read|--|uint32_t|get the amount of time (in millies) since the last state change)|
 |getProperty(name)|Read|friendlyName, state, event, lastChange|PropertyValue|Returns the current value of a property| |getProperty(name)|Read|friendlyName, state, event, lastChange|PropertyValue|Returns the current value of a property|
 |getID()|Read|--|uint8_t|Returns the element's unique ID| |getID()|Read|--|uint8_t|Returns the element's unique ID|
/var/www/wiki.moshnetworks.com/data/attic/mosh/element_library/button.1751033925.txt.gz · Last modified: by mosh

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki