1 // ------------------------------------------------
2 // Controlling LifxLightBulb through Particle Cloud
3 // @author Rahmadi Trimananda - UC Irvine
4 // ------------------------------------------------
6 #include "LifxLightBulb.h"
17 macAddress1[0] = 0xD0;
18 macAddress1[1] = 0x73;
19 macAddress1[2] = 0xD5;
20 macAddress1[3] = 0x12;
21 macAddress1[4] = 0x8E;
22 macAddress1[5] = 0x30;
23 macAddress1[6] = 0x00;
24 macAddress1[7] = 0x00;
25 IPAddress devIPAddress1(192, 168, 1, 126);
27 llb1 = new LifxLightBulb(devIPAddress1, macAddress1, 12345);
32 macAddress2[0] = 0xD0;
33 macAddress2[1] = 0x73;
34 macAddress2[2] = 0xD5;
35 macAddress2[3] = 0x02;
36 macAddress2[4] = 0x41;
37 macAddress2[5] = 0xDA;
38 macAddress2[6] = 0x00;
39 macAddress2[7] = 0x00;
40 IPAddress devIPAddress2(192, 168, 1, 232);
42 llb2 = new LifxLightBulb(devIPAddress2, macAddress2, 12346);
45 pinMode(led1, OUTPUT);
46 Particle.function("lifx1",lifx1Toggle);
47 Particle.function("lifx2",lifx2Toggle);
56 // Toggling Lifx light bulb 1
57 int lifx1Toggle(String command) {
63 else if (command=="off") {
72 // Toggling Lifx light bulb 2
73 int lifx2Toggle(String command) {
79 else if (command=="off") {