Event Information at Gmail Via Bolt and Proximity Sensor
by Susmita Das in Circuits > Sensors
923 Views, 15 Favorites, 0 Comments
Event Information at Gmail Via Bolt and Proximity Sensor
![Pic18.png](/proxy/?url=https://content.instructables.com/FP2/U1Y6/J4OFSICX/FP2U1Y6J4OFSICX.png&filename=Pic18.png)
This project is made for those who want to know about some event occuring with their devices via online services. IFTTT is a simple language, stands for " If this then that ", which enables us to connect to services so that, whenever something occurs with our devices, a trigger goes off and an action takes place automatically, which basically informs us about the event. The services may be any service eg. Facebook, Twitter, Instagram, YouTube, Dropbox, gmail and many more. For this project I have used gmail.
This project requires The BOLT and the Proximity sensor.
Here are the steps of connecting the gmail account with IFTTT:Create New Account
- I opened the site ifttt.com and created a new account. If anyone already have an account that can also be used.
Creating New Applet
![Pic1.png](/proxy/?url=https://content.instructables.com/FRL/ZQ3U/J4OFS361/FRLZQ3UJ4OFS361.png&filename=Pic1.png)
- After logging into the account go to My Applets.
- Click on New Applet
Click on "this"
![Pic2.png](/proxy/?url=https://content.instructables.com/FWX/CNNU/J4OFS38O/FWXCNNUJ4OFS38O.png&filename=Pic2.png)
Choose a Service
![Pic3.png](/proxy/?url=https://content.instructables.com/F7T/NV3O/J4OFS3AF/F7TNV3OJ4OFS3AF.png&filename=Pic3.png)
- Search for maker
- Click on Maker Webhooks.
Choose a Trigger
![Pic4.png](/proxy/?url=https://content.instructables.com/FNJ/QQ8N/J4OFS3BI/FNJQQ8NJ4OFS3BI.png&filename=Pic4.png)
Next step is to choose the trigger which will be fired when the event will occur.
- Click on "Receive a web request area" shown in picture
Complete Trigger Field
![Pic5.png](/proxy/?url=https://content.instructables.com/F21/SQ1Y/J4OFS3ES/F21SQ1YJ4OFS3ES.png&filename=Pic5.png)
- Give the name of the event. I have given it as "Bolt_event".
- Click on "Create trigger".
Creating "that" Part
![Pic6.png](/proxy/?url=https://content.instructables.com/F8U/S25A/J4OFS3P9/F8US25AJ4OFS3P9.png&filename=Pic6.png)
Now, our trigger part is ready. We have to set the action part which will inform us about the event.
- Click on "that".
Choose Action Service
![Pic7.png](/proxy/?url=https://content.instructables.com/F7A/Z6NU/J4OFS3Z3/F7AZ6NUJ4OFS3Z3.png&filename=Pic7.png)
- Any online services eg. Facebook, twitter etc. can be choosen. I have choosen "gmail service".
Choose the Appropriate
![Pic8.png](/proxy/?url=https://content.instructables.com/FGR/Q8Z2/J4OFS49D/FGRQ8Z2J4OFS49D.png&filename=Pic8.png)
- I have choosen the red marked option. So, whenever a trigger will be fired I will get a mail on my gmail account.
Click on "Create Action"
![Pic9.png](/proxy/?url=https://content.instructables.com/FBB/4971/J4OFS4EE/FBB4971J4OFS4EE.png&filename=Pic9.png)
Click on "Finish"
![Pic10.png](/proxy/?url=https://content.instructables.com/FTM/SH15/J4OFS4QU/FTMSH15J4OFS4QU.png&filename=Pic10.png)
After clicking on finish our Applet will be ready to serve.
Checking the Applet
![Pic12.png](/proxy/?url=https://content.instructables.com/FTW/5YW7/J4OFS5ZD/FTW5YW7J4OFS5ZD.png&filename=Pic12.png)
- Now to check whether the Applet is running correctly we have to go to "Maker Webhooker".
- There we will find "Documentation" option. Click on that.
- After clicking we will be redirected to the page as the picture.
- Click on "Test it"
Checked
![Pic11.png](/proxy/?url=https://content.instructables.com/FJY/YZLZ/J4OFS675/FJYYZLZJ4OFS675.png&filename=Pic11.png)
This will send me an email. That means it is working correctly.
Writting Html Code
![Pic14.png](/proxy/?url=https://content.instructables.com/FCF/E2B2/J4OFS8GJ/FCFE2B2J4OFS8GJ.png&filename=Pic14.png)
- The next step is to write the code which I have to upload on BOLT.
- The code is as given in the picture.
- I have saved this file as index.htm
Setting Up BOLT and Connection
![Pic13.png](/proxy/?url=https://content.instructables.com/FW0/J5SL/J4OFSAX2/FW0J5SLJ4OFSAX2.png&filename=Pic13.png)
- After power on the BOLT, when it becomes stable, I have connected the Proximity sensor as follows:
- VCC to 5 Volt pin
- GND to GND pin
- Output pin to GPIO-4
- After BOLT is connected to local area network, I have connected my laptop with same local area network and typed the BOLT_IP_ADDRESS and the default page opened.
- Then I typed BOLT_IP_ADDRESS/DEVELOPER and uploaded the index.htm file
- Then I restarted the BOLT.
Filling Form
![Pic15.png](/proxy/?url=https://content.instructables.com/FOV/E5UW/J4OFSC7K/FOVE5UWJ4OFSC7K.png&filename=Pic15.png)
- I got the output as in the picture.
- In the first inbox I have put the key that I got from IFTTT.
- In the second inbox I have given value 4 as the output pin is connected to GPIO-4 pin.
- In the third inbox I have given value high. It will trigger an event when there will be any obstacle infront of the sensor.
- In the forth inbox I have given value 1 to enable the IFTTT.
- After filling I clicked the submit button.
Output
![Pic17.png](/proxy/?url=https://content.instructables.com/FAQ/21ZU/J4OFSEBU/FAQ21ZUJ4OFSEBU.png&filename=Pic17.png)
- Now after clicking submit button my device is ready to respond. When I take my hand over the sensor I get a mail.