-
Notifications
You must be signed in to change notification settings - Fork 10
/
MEOChasing.h
58 lines (51 loc) · 2.03 KB
/
MEOChasing.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
G35: An Arduino library for GE Color Effects G-35 holiday lights.
Copyright © 2012 The G35 Authors. Use, modification, and distribution are
subject to the BSD license as described in the accompanying LICENSE file.
By Mike Tsao <http://github.com/sowbug>.
See README for complete attributions.
*/
#ifndef INCLUDE_G35_PROGRAMS_MEO_CHASING_H
#define INCLUDE_G35_PROGRAMS_MEO_CHASING_H
#include <MEOLightProgram.h>
class MEOChasing : public MEOLightProgram
{
public:
MEOChasing(MEOG35& g35, uint8_t pattern);
uint32_t Do();
static color_t PastelRGB(uint16_t sequence);
static color_t RGBY(uint16_t sequence);
static color_t RWB(uint16_t sequence);
static color_t RC(uint16_t sequence);
static color_t GM(uint16_t sequence);
static color_t BY(uint16_t sequence);
static color_t RG(uint16_t sequence);
static color_t GB(uint16_t sequence);
static color_t BR(uint16_t sequence);
static color_t CM(uint16_t sequence);
static color_t MY(uint16_t sequence);
static color_t YC(uint16_t sequence);
static color_t RGB(uint16_t sequence);
static color_t CYM(uint16_t sequence);
static color_t RCGMBY(uint16_t sequence);
static color_t PurplyBlue(uint16_t sequence);
static color_t Valentines(uint16_t sequence);
static color_t BlueTriad(uint16_t sequence);
static color_t BlueBronze(uint16_t sequence);
static color_t BlueTetrad(uint16_t sequence);
static color_t PurpleTetrad(uint16_t sequence);
static color_t GreenTetrad(uint16_t sequence);
static color_t GreenAccentedAlalogic(uint16_t sequence);
static color_t RedAccentedAlalogic(uint16_t sequence);
static color_t BlueAccentedAlalogic(uint16_t sequence);
static color_t RWG(uint16_t sequence);
static color_t ColourCycle(uint16_t sequence);
void RGB_to_HSL (double r, double g, double b, double *h, double *s, double *l);
void HSL_to_RGB(double h, double sl, double l, double *r, double *g, double *b);
private:
uint8_t count_;
uint16_t sequence_;
uint16_t wait_;
uint8_t pattern_;
};
#endif