Ever since I saw Iron Man and saw Jarvis in it I got very fascinated by it and I too wanted someone like him in my life. I mean he so amazing. We can do all our work without even moving our chair and by just giving and order. I decided that one day I too will build something like him. So I started learning things from here and their and then I started learning IOT and I was happy after taking my first step towards success. I have completed the training and now I have started building some small- small projects. This is one of my project which I have made using bolt which I would like to share with you.
VideoWell here is a short video (Sorry For the bad quality) of how it may look like.
Excited......??
So Let's get started......
Step 1: Hardware ConfigurationPlug the negative terminal (shorter end) of the buzzer to the ground of bolt and positive terminal (longer end) to any one of the GPIO pin using male to female wire and power on the bolt module by connecting it to any power source using a usb cable as shown in image below.
Login to https://cloud.boltiot.com. And if you haven't generated API key click on generate API key and make sure to enable it then copy and paste it somewhere safely your API key may look like this :- 44b2de6b-7e68-40e7-a27f-814b58afe008.
And You will be able to find your bolt ID easily on the dashboard it may look like it :- BOLT1234567 copy it too.
Step 3: Creating Your Control URLWe will be using analogWrite command in this if you want to see the documentation for this command you can visit: https://docs.boltiot.com/docs/write-analog-output-pwm
The structure of the command is like this:
https://cloud.boltiot.com/remote/API_KEY/analogWrite?pin=PIN_NUMBER&value=0-1023&deviceName=DEVICE_ID
NOTE: You will have to put your bolt API key which you have generated in the previous step in place of API_KEY, in place of PIN_NUMBER you will have to write the GPIO pin number in which you have connected the positive terminal of your buzzer, in value you will have to provide any one value which will decide the frequency of the sound of buzzer ranging from 0-1023 where 0 means buzzer off no sound and 1023 is the maximum frequency at which it can buzz and finally in place of DEVICE_ID you will have to put device id of your bolt wifi module which you got in the previous step.
Final URL may look like this :-
You can even click on your URL by changing value each time in your URL and the buzzer will buzz each time in accordance with the value which you have provided.
Step 4: Setting Your IFTTT AccountGo to ifttt.com by clicking this URL :- https://ifttt.com. Create your account on it and then click on create new applet or use this URL :- https://ifttt.com/create
Login using your Gmail account. Make sure you use same account which you'll be using on your mobile to interact with Google Assistant.
Click on '+This' to create the trigger.
Choose Google Assistant -> Say Specific Phrase.
1 / 2
Type the phrase you want to trigger the action. Make sure to specify the trigger command in different ways for example I used.
a) Turn on buzzer.
b) Make it sound.
c) buzzer on kar.
Or anything else you like then click on Create Trigger.
Now click on '+That'.
Select Webhooks and then Make a web request.
1 / 2
Enter the API URL you got in the previous Step. Make sure that you change the API Key and device name.
Method will be GET.
Content type will be Application/json.
This how your screen may look like:
Click on 'Create Action' and then Click on 'Finish'.
Step 5: Turn Off the Buzzer and Make It Buzz on a Different FrequencyNow that you have learned how to set the buzzer on you can be quite creative repeat the step 4 again and in the make changes in the value of URL tbo any number between 0-1023.
NOTE: If you will set the value to 0 the buzzer will turn off also if you will write any number more than 1023 the buzzer will not buzz.
Try out different frequencies and play with it.
That's It! You're Done!Now wake your Android phone by saying "OK Google" and say the phrase you had set while creating the trigger to see the magic happen.
Hope you like it.
Thank you.
Comments
Please log in or sign up to comment.