Software apps and online services
I was tired of not knowing if I had a new email when my phone was silenced, so I created this project. IFTTT checks if you have a new email and then it calls a function on a Particle Photon to fire a laser.
The wiring is pretty simple. I just connected a battery to GND and the collector on an NPN transistor. The laser diode connects to GND and the emitter of the transistor. Lastly, pin 3 on the Photon connects to the base pin of the transistor.
The code for this is quite simple. I simply created a function called "laser" that turns on pin 3 and flashes it for 5 seconds. It utilizes the Particle Cloud API to call functions from the Particle Cloud, allowing IFTTT to control the Photon.
This is the most important part of this whole project. First, click on "New Applet".
Then select the Gmail service and choose the "When a new email appears in my inbox" option.
For the "That" portion, just use the "Call a function" choice from the Particle Photon service.