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.
Plug 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.
Login 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
Go 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:
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:
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
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:
The sample command to turn the led OFF connected to device having ID BOLT3848686 to PIN 0 is:
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.
Click 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:
Now we can see the project is ready the triggers performs the action and the led gets on and off when the trigger counters.
here 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.