Back to Parent

1. The first part of the circuit that I assembled and coded was the LED output part. The red LED is the one in the bathroom. It blinks once as soon as the light is turned on to indicate that the timer has started. After the light remains on for more than 10 minutes, it blinks continuously. The green LED is outside the bathroom. It glows to signal that the bathroom is in use.

2. The next part of the circuit and coding is the light sensor. A photoresistor was connected to an analog pin as the input part of the circuit. I then calibrated the bathroom light in my house to determine the threshold value that would trigger presence/absence and complete the circuit.

3. The music circuit is an additional feature. A piezospeaker was connected to an analog pin and programmed to play a part of a song. The code for this was obtained from an online source: https://learn.sparkfun.com/tutorials/sparkfun-inventors-kit-for-photon-experiment-guide/experiment-5-music-time . Initially, I intended the device to connect to an internet radio service such as Spotify or play music through my iPhone. However, IFTTT does not allow this functionality yet.

4. The last part included connecting the device to the cloud so that the time spent in the bathroom could be logged into a spreadsheet on google drive.


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0