Imagine a scenario where my Spark is the only thing that controls the light in my room. Its late in the night and I don’t want my mom to know that I’m playing Minecraft all night so I need to switch Off the light, but the router fails before I get to switch it Off. I really need to switch this damn light Off.
Keeping in mind the highly probable scenario, is there a way to hack the Smart Config code on the Spark so that I could control things. This is how I’d like to go about it:
- Put the in Smart Config mode automatically when there’s no access to the internet by setting the flag WLAN_SMART_CONFIG_START = 1;
- On the Smart Config App, I would like to send the SSID - “controlLight” and PASSWORD - “false”.
- On the Spark Firmware:
- Write a function controlLight() which controls the state of the digitalpin
- Read the SSID as a string or char array and compare it to “controlLight”.
- If true; Read the Password as a string and char array and compare it to “true” or “false”.
- If true; Call the function controlLight(false) which turns the light Off.
So can someone tell me if its possible to do. If so, in which file(s) of the firmware would I have too make changes in to make it happen?