+void run(LifxLightBulb *llb) {
+
+ llb->init();
+}
+
+
+void *prun(void *llb) {
+
+ ((LifxLightBulb*)llb)->init();
+}
+
+
+void onOff(LifxLightBulb *llb) {
+
+ for (int i = 0; i < 5; i++) {
+ llb->turnOff();
+ cout << "Turning off!" << endl;
+ this_thread::sleep_for (chrono::milliseconds(1000));
+ llb->turnOn();
+ cout << "Turning on!" << endl;
+ this_thread::sleep_for (chrono::milliseconds(1000));
+ }
+}
+
+
+void adjustTemp(LifxLightBulb *llb) {
+
+ for (int i = 2500; i < 9000; i += 100) {
+ cout << "Adjusting Temp: " << i << endl;
+ llb->setTemperature(i);
+ this_thread::sleep_for (chrono::milliseconds(100));
+ }
+ cout << "Adjusted temperature to 9000!" << endl;
+ for (int i = 9000; i > 2500; i -= 100) {
+ cout << "Adjusting Temp: " << i << endl;
+ llb->setTemperature(i);
+ this_thread::sleep_for (chrono::milliseconds(100));
+ }
+ cout << "Adjusted temperature to 2500!" << endl;
+}
+
+
+void adjustBright(LifxLightBulb *llb) {
+ for (int i = 100; i > 0; i -= 10) {
+ cout << "Adjusting Brightness: " << i << endl;
+ llb->setColor(llb->getHue(), llb->getSaturation(), i);
+ this_thread::sleep_for (chrono::milliseconds(100));
+ }
+ cout << "Adjusted brightness to 0!" << endl;
+ for (int i = 0; i < 100; i += 10) {
+ cout << "Adjusting Brightness: " << i << endl;
+ llb->setColor(llb->getHue(), llb->getSaturation(), i);
+ this_thread::sleep_for (chrono::milliseconds(100));
+ }
+ cout << "Adjusting brightness to 100!" << endl;
+}
+
+