-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrolly.h
43 lines (32 loc) · 1.02 KB
/
brolly.h
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
36
37
38
39
40
41
42
43
//all arduino libraries require this
//#include "WProgram.h"
//Here we keep the header from being included multiple times
#ifndef brolly_h
#define brolly_h
//We use both other brolly libraries here
#include "memory_propigation.h"
#include "memory_color.h"
//Here is the brolly class. This encapsulates color and offset for each brolly.
class Brolly{
public:
//constructor
Brolly();
//move along the color scheme
Color advanceColor();
//these wrap the LEDchannels array
Color setColor(Color in_color);
Color getColor();
//Here are initalizers we use because the constructor can't use millis
void initialize(int i);
void setDelay();
//here are the private data
private:
//address of the brolly. initalized to the number of the brolly in the array
int address;
//this is the delay from the previous sequence
unsigned long lastDelayTime;
//this is the delay from the current sequence
unsigned long delayTime;
};
extern Brolly brollies[];
#endif