We are living in apartment of three roommates that some of them are smokers. People in out apartment used to use the back door to go smoke out side of the apartment and sometimes they forget to lock the door after they finish. On the other hand, the people in the apartment take the billing very serious because they are students and it hard to mange their budgets, so they never forget to turn the light off whenever they are going out or to sleep. As a solution, we built a device that lock the door whenever the light is off.
Here, we can see in the console the Particle.io website the data from the Photon. We can see two data, bright and dark. We the data says it is bright that means the room's light is on and the servo motor turn to open the door lock. In the other hand, when the data says it is dark that means the room's light is off and the light in the circuit turn on, so the servo motor turn to lock the door lock.