-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathled.h
More file actions
35 lines (27 loc) · 663 Bytes
/
led.h
File metadata and controls
35 lines (27 loc) · 663 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef _LED_H_
#define _LED_H_
class LedHandler {
private:
unsigned long start;
unsigned long next;
boolean counter_rolled;
boolean initial_led_state;
void toggle();
protected:
uint8_t pin;
unsigned long led_on_duration;
unsigned long led_off_duration;
unsigned long led_repeat;
boolean led_state;
public:
LedHandler(uint8_t ledPin);
void Init();
void Init(uint8_t ledPin);
void On();
void Off();
void Blink(unsigned long duration, int repeat);
void Blink(unsigned long on_duration, unsigned long off_duration,
int repeat, boolean initial_led_state);
void Task();
};
#endif