How many of you have been late to class, or any other obligation, because you pressed "Snooze" on your alarm clock and went straight back to bed? Better yet, how many times have you had to skip out on your morning cup of joe because you pressed "Snooze" too many times? With this alarm clock, that is no longer a problem.
This project requires two different particle photons: one to control the servo motor and one to control the LCD, buzzer, and photo resistor.
The LCD serves as the alarm clock. The time of the clock is controlled through the coding, while the time of the alarm is controlled through an IFTTT applet. When the alarm goes off, it keeps going off until the photo resistor senses that the lights have been turned on. Once the photo resistor senses that there is enough light, it signals the other particle photon to start moving the servo motor, which in turn starts brewing the coffee.
The servo motor is programmed to move just far enough until there is enough force to push the start button on the coffee maker. The servo motor then moves back to its original position. When the coffee is finished, the particle photon will send a text to your phone saying that your coffee is ready. If This Then That Integration
The first IFTTT applet is used to turn the alarm clock on and off. If a push button was pressed, then the particle would call a function in its coding. The function would have a certain input, which the user can specify. The push button can be added to a users smartphone home screen for easy access to the alarm.
1 / 2 • Applet for setting the alarm time.
The second IFTTT applet created saves the data the photo resistor receives to google sheets. In the coding, the particle publishes the amount of light that it receives to the particle console. If the particle publishes "light" then the data is saved to google sheets.
1 / 3 • Applet for pushing data to Google Sheets.
The third IFTTT applet created is how the two particle photons communicate with each other. If the variable "light" is greater than 6%, then the function "newPos" will be called. When that function is called, it takes the 30 as input and moves the servo motor that far.
1 / 3 • Applet allowing the two photons to communicate with each other.
The fourth, and final, IFTTT applet created sends a text to the user letting them know that their coffee is finished. The servo motor is coded to return to it's starting position just as the coffee is finished. If the servo motor has returned back to it's original position, then a text will be sent to the user's phone letting them know that their coffee is finished.
Google Sheets Graph
The following images show the data that was sent to Google Sheets through the IFTTT app.
1 / 4 • Data received by photo resistor with a normal ceiling light, when it was covered, and with a flashlight directly above it.
1 / 5 • First Particle Photon setup.