Skip to content

jurgenbelien/IlluminatedButton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IlluminatedButton

Class for working with buttons with leds inside.

Note: multi-LED functionality is untested

Example usage

#include <IlluminatedButton.h>

#define PIN_BUTTON 3
#define PIN_LED 1

IlluminatedButton button(PIN_BUTTON, PIN_LED);

void setup() {
  Serial.begin(9600);
  button.init();
}

void loop() {
  button.update();

  if (button.pressed()) {
    Serial.println("Button pressed");
  }
}

Take a look at the examples to see how to add callbacks and add momentary button press feedback.

About

Class for working with buttons with leds inside.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages