-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLighthouse.ino
72 lines (56 loc) · 1.35 KB
/
Lighthouse.ino
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
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <FastLED.h>
#define LED_PIN 10
#define LED_TYPE WS2811
#define COLOR_ORDER RGB
#define framerate 200
//#define COLOR_CORRECTION CRGB(255,172,240)
#define BRIGHTNESS 255
#define NUM_LEDS 16
CRGB leds[NUM_LEDS];
CRGB buffer[NUM_LEDS];
uint8_t counter = 1;
//#include "Necklace_animations.h"
#include "animation.h"
#include "ringrunner.h"
#include "fireworks.h"
#define NUM_ANIMATIONS 1
Animation * current_animation;
Animation *(*list[NUM_ANIMATIONS])();
// setup gets called once
void setup() {
list[0] = &ringrunner_factory;
list[1] = &fireworks_factory;
//list[1] = &foobar_factory;
current_animation = list[1]();
//delete current_animation; - goes in button press
//current_animation = list[1]();
// power-up sanity delay
delay( 3000 );
// tell FastLED about the LEDs
FastLED.addLeds<LED_TYPE,LED_PIN,COLOR_ORDER>(leds, NUM_LEDS);
// set master brightness control
FastLED.setBrightness(BRIGHTNESS);
pinMode(3, INPUT_PULLUP);
// attachInterrupt(0, Change_animation, FALLING);
}
///Declare patterns and animation class
/*Pattern Patternlist [] =
{
Animation_1,
Animation_2,
random_ring
};*/
///
/*void Change_animation()
{
animation.iterate_animation();
}*/
// loop is called repeatedly forever
void loop()
{
current_animation->step();
/*counter++;
if(counter==0){
Change_animation();
}*/
}