What’s next?
There’s now no limit to what you can do. Just have to add some code on the device, in the cloud and add some module to change the world ;)
Here are some ideas and challenge you can have fun to deal with :
– Security: Nothing is secured in this example. Anybody can play with your light.
– Additional ligths: Our solution works with one light. How will you deal with more than one ?
– Automation: Just add a PIR module to swicth the light on when someone get close.
– Weather station: You could add some module to record temperature and humidity.
– Tracking: record all the state change in the cloud. You’ll be able to track consumption.
– Mobile: A web site can be used on nearly every modern mobile device on the planet but a native app would be more efective. A Windows Phone app with a dedicated secondary tile on your home screen would be unbeatable on productivity.
The possibilities are endless.
Have fun.
Hello, it’s the first time I see something like:
LightOn = s == “true”;
What does that do exactly? Does this coding trick has a name? (in order to search for it on Google…)?
Thank you
Hi, this code means that LightOn will get the boolean result of s equal the string “true”. I could have write it like this
LightOn = s == “true” ? true : false;
or
if (s == “true”) {
LightOn = true;
} else {
LightOn = false;
}