1 // ------------------------------------------------
2 // Controlling LifxLightBulb through Particle Cloud
3 // @author Rahmadi Trimananda - UC Irvine
4 // ------------------------------------------------
6 #include "LifxLightBulb.h"
14 string macAddress1 = "D073D5128E300000";
15 uint8_t devIPAddress1[] = { 192, 168, 1, 126 };
16 llb1 = new LifxLightBulb(devIPAddress1, macAddress1, 12345);
20 string macAddress2 = "D073D50241DA0000";
21 uint8_t devIPAddress2[] = { 192, 168, 1, 232 };
22 llb2 = new LifxLightBulb(devIPAddress2, macAddress2, 12346);
25 Particle.function("lifx1",lifx1Toggle);
26 Particle.function("lifx2",lifx2Toggle);
33 for(int i=0; i < 3; i++) {
42 // Toggling Lifx light bulb 1
43 int lifx1Toggle(String command) {
49 else if (command=="off") {
58 // Toggling Lifx light bulb 2
59 int lifx2Toggle(String command) {
65 else if (command=="off") {