This project is about using your android mobile phone to save you when you are being stalked by someone in public. This makes use of your google assistant to alert your family members at home that you are being followed by someone.This is an easy to build to project and makes use of your android device to save you at those harmful times. This can prevent many mishappenings on the road. You can activate the buzzer from any part of the world(wherever you have an internet connection).
Step 1: Hardware SetupPlug the longer end of the BUZZER in the Pin 0 of Bolt WiFi module shorter end to the ground pin (GND).
Power on the Bolt WiFi module.
Connect it to a network and check whether you get the green led glowing.
After this, procede to STEP 2.
Step 2: Getting the Bolt API Key and Device IDLogin to cloud.boltiot.com and note the ID of your Bolt WiFi Module.
Now click on the API Tab and under the section for Generate Key, click on Enable.
STEP 3: PIN CONFIGURATIONWe have to give a digital write command that can be sent through the internet to turn ON our Buzzer when the appropriate commands are given via GOOGLE ASSISITANT.
Given below is the basic structure of the command we are going to use:
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
API_KEY=The KEY that you copied from your BOLT CLOUD.
PIN_NUMBER=The pin that you are going to use (i.e)the pin where the longer leg of the buzzer is connected.
You can use HIGH/LOW to turn ON or turn OFF the led. We are going to create two seperate commands for turning buzzer ON and OFF.
DEVICE_ID=The ID from the BOLT CLOUD page.
STEP 4:CUSTOM GOOGLE HOME RESPONSEGo to IFTT website by clicking here.
SIGN UP as a new USER.(sign up using the same gmail acoount as your android device Play Store.
Go to MY APPLETS section-->Create a new APPLET
Click on '+This' to create a trigger.
Choose Google Assistant -> select "Say Specific Phrase"
Click on '+That'
Select Webhooks and then Make a web request.
THEN,
Select "Make a web request"
NOW, enter the API URL that you got.
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH&deviceName=DEVICE_ID
Method-------GET
Content Type--------application/json
Create Action
STEPSTOTURNOFTHEBUZZER
Now do the same process for a command to switch of the BUZZER. Here you will change the state to LOW i.e. state=LOW in your code. Here is a sample of the code. Also, add a suitable phrase to switch off the BUZZER.
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
STEP 5:USING YOUR ASSISTANTNow take your Android phone and say "OK Google" and say the phrase you had set while creating the trigger to see what happens.
Comments