-
Notifications
You must be signed in to change notification settings - Fork 1
/
i-am-iron-man.ino
53 lines (42 loc) · 1.12 KB
/
i-am-iron-man.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
// This #include statement was automatically added by the Particle IDE.
#include "InternetButton/InternetButton.h"
InternetButton b = InternetButton();
void setup() {
b.begin();
//expose ironMan function for IFTTT intergration
Particle.function("ironMan", ironMan);
}
void loop() {
}
int ironMan(String null) {
// Arc Reactor Power-Up Sequence
b.ledOn(12, 0, 255, 255); // cyan LED
delay(500);
b.ledOn(2, 0, 255, 255);
b.ledOn(10, 0, 255, 255);
delay(500);
b.ledOn(3, 0, 255, 255);
b.ledOn(9, 0, 255, 255);
delay(500);
b.ledOn(4, 0, 255, 255);
b.ledOn(8, 0, 255, 255);
delay(500);
b.ledOn(5, 0, 255, 255);
b.ledOn(7, 0, 255, 255);
delay(500);
b.ledOn(4, 0, 255, 255);
b.ledOn(6, 0, 255, 255);
delay(500);
// Pulsate Arc reactor 5 times
for(int i = 0; i < 5; i++) {
for(int i = 0; i <= 255; i++) {
b.allLedsOn(0,i,i);
delay(5);
}
for(int i = 255; i >= 0; i--) {
b.allLedsOn(0,i,i);
delay(5);
}
}
return 0;
}