- STEP1:CONNECTONS
Connect the shorter leg of LED to the ground pin and longer leg to the digital i/o pin of the bolt module. Power on the WiFi module by connecting to an external source.
- STEP 2 : GENERATE API KEY AND DEVICE ID
Visit www, cloud, boltiot, com.Log in to your account. Click on on the API option on the left side of the screen and your API key will be generated. Click on the device option and you will find the device id there
- STEP3:GPIO CONTROL
To turn ON the LED-
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH&deviceName=DEVICE_ID
TO turn OFF the LED-
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
where PIN_NUMBER should be replaced by the i/o pin that you connect the LED.High and low changes with ON and OFF respectively.
- STEP4:IFTTT(If this then that)
Visit https://ifttt.com/my_applets to create a new applet. Login to IFTTT with same credentials as your Google assistant.
To Turn ON the LED:
1.Click on '+This' to create the trigger.
2.Choose Google Assistant and then select Say Specific Phrase
3.Type the phrase you want to trigger the action.
- Turn the lights ON
- Turn ON the lights
- Lights ON
Click on 'Create Trigger'
Now, Click on '+That'
Select Webhooks and then Make a web request.
Enter the API URL you got in the previous Step. https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH&deviceName=DEVICE_ID
Method will be GET
Content type will be Application/json
Click on 'Create Action' and then Click on 'Finish'.
To Turn OFF the LED:
1.Click on '+This' to create the trigger.
2.Choose Google Assistant and then select Say Specific Phrase
3.Type the phrase you want to trigger the action.
- Turn the lights OFF
- Turn OFF the lights
- Lights OFF
Click on 'Create Trigger'
Now, Click on '+That'
Select Webhooks and then Make a web request.
Enter the API URL you got in the previous Step. https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
Method will be GET
Content type will be Application/json
Click on 'Create Action' and then Click on 'Finish'.
- STEP5:Testing
On your Google assistant, say OKGoogle followed by your chosen phrase.
AND VIOLAAA!!!!!Your project is ready.
MYPROJECT
https://drive.google.com/file/d/1bw7Fm4PVP1HytdSmnUEPX6N9a6SzcmLz/view?usp=sharing
Comments
Please log in or sign up to comment.