Created
May 19, 2019 20:26
-
-
Save rustyeddy/89b71e86adda290919ce8fce88bcb5b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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