forked from alexisisaac/MashedPixels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIceCrystalsMode.h
36 lines (32 loc) · 1022 Bytes
/
IceCrystalsMode.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
#include <Arduino.h>
#include <FastLED.h>
#define ICE_COUNT 10
enum ice_state {
ICE_GROWING,
ICE_FLICKERING,
ICE_EXPLODING,
ICE_SLEEPING
};
struct ice_data{
double position;
unsigned long start;
unsigned long growingSpeed;
unsigned long flickeringDuration;
unsigned long explodingDuration;
unsigned long wakeupTime;
double explodingSpeed;
ice_state state;
};
class IceCrystalsMode{
private:
int count;
ice_data ice[ICE_COUNT];
void initializeIce(int a);
public:
IceCrystalsMode(int pCount);
void loop(CRGB *leds);
void init();
#ifdef MODE_EXPORT_NAME
static const char *name;
#endif
};