-
-// Functions for the main function
-void onOff(LifxLightBulb *llb) {
-
- for (int i = 0; i < 2; 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;
-}
-
-
-/*int main(int argc, char *argv[])
-{
- string macAddress1 = "D073D5128E300000";
- //string macAddress = "D073D50241DA0000";
- string devIPAddress1 = "192.168.1.126";
- //string devIPAddress = "192.168.1.232";
- IoTDeviceAddress* devAddress1 = new IoTDeviceAddress(devIPAddress1, 12345, 56700, false, false);
- unordered_set<void*>* myset1 = new unordered_set<void*>();
- myset1->insert(devAddress1);
-
- IoTSet<void*>* setDevAddress1 = new IoTSet<void*>(myset1);
- LifxLightBulb *llb1 = new LifxLightBulb(setDevAddress1, macAddress1);
- cout << "Generated LifxLightBulb object!" << endl;
- llb1->init();
- cout << "Initialized!" << endl;
- llb1->turnOn();
- cout << "Turning on!" << endl;
- onOff(llb1);
-// adjustTemp(llb1);
-// adjustBright(llb1);
- llb1->turnOff();
-
-// delete devAddress1;
-// delete llb1;
-
- return 0;
-}*/