IntroductiontotheProject:-
google voice recognition for led is a purely IOT based project using triggers and applets. which is easy to learn and make these kind of projects. it is also a home appliances project and mainly you need a smart phone to the control led.
Step 1: Hardware SetupPlug the longer end of the LED in the Pin 0 of Bolt WiFi module shorter end to the ground pin (GND), and power on the Bolt WiFi module by power bank or external device.
Step 2: A unique way of Getting the Bolt API Key and Device IDLogin to www.cloud.boltiot.com go to dashboard and then click API there you will get a option called generate key copy the 20 digit API key.
For example the API key looks something like this: f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf
Step 3: Coding part of the programGo to the Dashboard of the BOLT IOT and the click on product. and then go to add product and the create a product name you like to connect to your Bolt to input devices and you have to collect the data to GPIO then save it.
configure your product:
coding part:
Since LED has a output with the digital values. we have to make sure that the output is seen perfect.
The structure of the command is:
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
The parameters that you need to replace are:API_KEY: You can get the API key from the BOLT iot dashboard.
Ex of the API_KEY
f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf
PIN_NUMBER: The ground Pin is connected the LED. Values can be either 0, 1, 2, 3 or 4HIGH/LOW: This value indicates if you want to turn on/off the LED. High value is for turning off the device. off value is for turning off the device.DEVICE_ID: The id of your device. You can get it from cloud dashboard.
The sample command to turn the led ON connected to device having ID BOLT3848686 to PIN 0 is:
After you have completed on trigger then repeat the same condition for off trigger.https://cloud.boltiot.com/remote/f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf/digitalWrite?pin=0&state=HIGH&deviceName=BOLT13819450
The sample command to turn the led OFF connected to device having ID BOLT3848686 to PIN 0 is:
https://cloud.boltiot.com/remote/f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf/digitalWrite?pin=0&state=LOW&deviceName=BOLT13819450
You have to use your own API Key and device ID of the bolt device which you have done in the previous step.
here you have to connect your ground pin as per the requirement off the code.
Step 4: With the help of IFTTT Google Assistant and WebhooksClick on '+This' to create the trigger.
Choose Google Assistant -> Say Specific Phrase
1 / 2
Here if you want to trigger the action. Make sure to specify the trigger command in different ways for example I used
a) ok google turn on LED
b) Turn on LED
c) Lights ON
Click on 'Create Trigger'
Click on '+That'
Select Webhooks and then Make a web request.
1 / 2
Here you have to paste the API key that you have copied from the dashboard.
write the set of commands that are given to on an and off the led.
Method will be GET
Content type will be Application/json
Here is how your screen will look like
Here you have to click "on action" when it is done you have to finish it.
REPEAT THE SAME TERMS FOR TURNING OFF THE LED.
you can the project by the given link below:
https://drive.google.com/file/d/1nxEzBGjn2Phy1QKmoGYFPn0SV9fp40MC/view?usp=sharing
That's it. You are done.Now we can see the project is ready the triggers performs the action and the led gets on and off when the trigger counters.
Conclusionhere the main intention is to check the project. we are using our smartphone to trigger the output.
Full Disclosure: As I can say that I am a developer of the Bolt IoT Platform. So I will praise it quite frequently during this blog, not only because I have to sell it but also because I sincerely believe that one of the best IoT platform ever.
Comments