-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathledsuit.ino
53 lines (46 loc) · 1.21 KB
/
ledsuit.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
#include <IRremote.h> // note conflicts with Tone.cpp, update IRRemoteInt.h to use a different timer pin
#include <Adafruit_NeoPixel.h>
#include "constants.h"
#include "ledfacade.h"
#include "runner.h"
#include "controller.h"
// runs all the tickets
Runner runner = Runner();
// controlls the led suit using ir-remote
IRrecv irrecv(IR_PIN);
Controller controller = Controller();
// needed to control the leds
LedFacade leds = LedFacade();
// button effects
ButtonClickEffect change_effect = ButtonClickEffect();
ResetEffect reset_effect = ResetEffect();
Strobo strobo = Strobo();
// effects
Effect* effects[] = {
&strobo,
new RandomFill(),
new FunctionEffect(&glowRed),
new FunctionEffect(&colorFade)
//new FunctionEffect(&glowColors),
//new FunctionEffect(&colorWheelFull),
//new FunctionEffect(&colorWheelHighRes),
//new FunctionEffect(&colorWheel2)
};
int num_effects = 2;
void play_tone(int freq, int duration) {
tone(BUZZER, freq, duration); // 100ms
}
void setup() {
// for std out
Serial.begin(9600);
//leds.begin();
Serial.println("setup");
play_tone(1000, 300);
play_tone(2000, 500);
leds.begin();
irrecv.enableIRIn();
}
void loop() {
Serial.println("looping");
runner.loop();
}