This project is for our MEGR 3171 Measurement and Instrumentation Class. The purpose of this project is to implement 2 Particle Photons that communicate with each other to send and receive data. The data in this case is a temperature reading that indicates when your tea/coffee/other warm beverage has been cooled to the proper drinking temperature. Once a specific temperature has been reached, you will then receive a text message alerting you your drink is ready. No more burned mouths! Hooray!
This project also makes use of ThingSpeak and IFTT as well. ThingSpeak was used to track the real time temperature data while IFTT was used to send a text message to your phone when your drink has fallen below a specified threshold temperature.
Build the Circuit:Begin the project by building the circuit listed in the circuit diagram below. You only need to attach one temperature sensor to one photon, the other Photon is simply used to read data and trigger an IFTT event!
Copy and Paste the code:Once the circuit is built, copy and paste the code listed below. Remember that the two code examples should be saved as separate projects, do not try to copy both codes into the same program! The code is heavily commented to hopefully keep things as clear as possible.
Note: You will have to update the code with your own data.
The code has place holders instead of usable API keys/ Data channels etc. which you can find on the ThingSpeak and IFTT websites.
Navigate to ThingSpeak:After copying and saving the 2 codes, navigate over to thingspeak.com. Set up a channel for yourself, and make note of the data channel and API Read Key. These will need to be copied into your code to ensure it can send and read data properly.
Fill this form out, if you wish to do less work leave the Field name and location the same as this is the same as in the sample code.
Navigate back to your code:After setting up ThingSpeak, go back to your code, and replace the place holder API keys, Data Channel number and Field numbers accordingly. Save everything!
Head over to IFTT:After you have updated your code, head over the IFTT website to make a recipe. Choose the SMS Recipe for Photon. To start, click new applet and search for photon. Then select "New Event Published". It looks like this:
After clicking that, fill out the information.
Note: When filling this out, be sure to select the proper Photon to read the event. This should be the photon WITHOUT the temperature sensor attached to it.
tea_time
is the default event in the sample code that was uploaded. If you wish to change this name, you must also change it in the code. Finally, choose what device should be read what you would like to be texted:
Hit save, and the next time you make tea, simply re-flash the particle that reads the data from the cloud, and wait to be texted when your beverage is at your preferred temperature!
Youtube Video Demonstration
Comments