Skip to content

Instantly share code, notes, and snippets.

@rustyeddy
Created May 19, 2019 20:26
Show Gist options
  • Save rustyeddy/89b71e86adda290919ce8fce88bcb5b2 to your computer and use it in GitHub Desktop.
Save rustyeddy/89b71e86adda290919ce8fce88bcb5b2 to your computer and use it in GitHub Desktop.
class LED {
private:
gpio_num_t _pin = GPIO_NUM_0;
gpio_mode_t _mode = GPIO_MODE_OUTPUT;
int _state = 0;
public:
LED(gpio_num_t p);
void set(int val);
void on();
void off();
void toggle();
void blink(int ondur, int offdir, int count);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment