| ButtonToSwitch Library for ESP32 (Arduino) v4.6.1 A library that provides elaborated switch mechanism behavior simulation for digital signals inputs

Loading...
Searching...
No Matches
ButtonToSwitch_ESP32.h File Reference

: Header file for the ButtonToSwitch_ESP32 library classes More...

`#include <Arduino.h>`
`#include <stdint.h>`
Include dependency graph for ButtonToSwitch_ESP32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
struct | MpbOtpts_t
| Type to hold the complete set of output attribute flags from any DbncdMPBttn class and subclasses object. More...
class | DbncdMPBttn
| Base class, models a Debounced Momentary Push Button (D-MPB). More...
class | DbncdDlydMPBttn
| Models a Debounced Delayed MPB (DD-MPB). More...
class | LtchMPBttn
| Abstract class, base to model Latched Debounced Delayed MPBs (LDD-MPB). More...
class | TgglLtchMPBttn
| Models a Toggle Latch DD-MPB, a.k.a. a Toggle Switch (ToLDD-MPB). More...
class | TmLtchMPBttn
| Models a Timer Latch DD-MPB, a.k.a. Timer Switch (TiLDD-MPB). More...
class | HntdTmLtchMPBttn
| Models a Hinted Timer Latch DD-MPB, a.k.a. Staircase Switch (HTiLDD-MPB). More...
class | XtrnUnltchMPBttn
| Models an External Unlatch LDD-MPB, a.k.a. Emergency Latched Switch (XULDD-MPB) More...
class | DblActnLtchMPBttn
| Abstract class, base to model Double Action LDD-MPBs (DALDD-MPBs). More...
class | DDlydDALtchMPBttn
| Models a Debounced Delayed Double Action Latched MPB combo switch (Debounced Delayed DALDD-MPB - DD-DALDD-MPB) More...
class | SldrDALtchMPBttn
| Models a Slider Double Action LDD-MPB combo switch, a.k.a. off/on/dimmer, a.k.a. off/on/volume radio switch)(S-DALDD-MPB) More...
class | VdblMPBttn
| Abstract class, base to model Voidable DD-MPBs (VDD-MPB). More...
class | TmVdblMPBttn
| Models a Time Voidable DD-MPB, a.k.a. Anti-tampering switch (TVDD-MPB) More...
class | SnglSrvcVdblMPBttn
| Models a Single Service Voidable DD-MPB a.k.a. Trigger switch (SSVDD-MPB) More...

## Functions
MpbOtpts_t | otptsSttsUnpkg (uint32_t pkgOtpts)
| Unpackages a 32-bit value into a DbncdMPBttn object status.

## Detailed Description

: Header file for the ButtonToSwitch_ESP32 library classes

The library implements classes that model several switch mechanisms replacements out of simple push buttons or similar equivalent digital signal inputs. By using just a button (a.k.a. momentary switches or momentary push buttons, MPB for short from here on) the classes implemented in this library will manage, calculate and update several parameters to generate the embedded behavior of standard electromechanical switches.

Repository: https://github.com/GabyGold67/ButtonToSwitch_ESP32

Framework: Arduino
Platform: ESP32

Author
  Gabriel D. Goldman
  mail gdgol.nosp@m.dman.nosp@m.67@ho.nosp@m.tmai.nosp@m.l.com
  Github https://github.com/GabyGold67

Version
  v4.6.1

Date
  First release: 06/11/2023
  Last update: 30/07/2025 17:30 (GMT+0200) DST

Copyright
  Copyright (c) 2025 GPL-3.0 license

Attention
  This library was originally developed as part of the refactoring process for an industrial machines security enforcement and productivity control (hardware & firmware update). As such every class included complies AT LEAST with the provision of the attributes and methods to make the hardware & firmware replacement transparent to the controlled machines. Generic use attributes and methods were added to extend the usability to other projects and application environments, but no fitness nor completeness of those are given but for the intended refactoring project, and for the author's projects requirements.

Warning
  Use of this library is under your own responsibility
  The use of this library falls in the category described by The Alan Parsons Project (c) 1980 Games People play disclaimer:
  Games people play, you take it or you leave it
  Things that they say aren't alright
  If I promised you the moon and the stars, would you believe it?

## Function Documentation

## ◆ otptsSttsUnpkg()

MpbOtpts_t otptsSttsUnpkg | ( | uint32_t | pkgOtpts | ) |

Unpackages a 32-bit value into a DbncdMPBttn object status.

The 32-bit encoded and packaged is used for inter-task object status comunication, passed as a "notification value" in a xTaskNotify() execution. For each bit value attribute flag represented see DbncdMPBttn::getOtptsSttsPkgd()

Parameters

  pkgOtpts | A 32-bit value holding a DbncdMPBttn status encoded

Returns
  A MpbOtpts_t type element containing the information decoded