Shreya Sonawane
Published © GPL3+

Turning On/Off Led Using Google Assistant

This project is used to turn on and off the led using the BOLT IOT kit and using google assistant. Which uses IFTTT to create triggers.

BeginnerProtip3 hours341
Turning On/Off Led Using Google Assistant

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
LED (generic)
LED (generic)
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
IFTTT WEBHOOKS
IFTTT GOOGLE ASSISTANT

Story

Read more

Schematics

Circuit Diagram

The positive (long leg) goes in the 0 pin and the negative (short leg) goes into the GND.

Code

Code for turning on and off the led

JavaScript
state=HIGH/LOW&deviceName=DEVICE_ID
Now the command basically tells the led to turn on and off
The major parameters in this piece of code is
API_KEY: you can get this key from your bolt cloud
PIN_NUMBER: The ground Pin is connected the LED. Values can be either 0, 1, 2, 3 or 4HIGH/LOW:
STATE: this variable is used to tell weather the led should turn on or off according to the its high/low value. High value is for turning off the device. off value is for turning off the device.
DEVICE_ID: This is the id of your device. Which you can easily obtain from the cloud dashboard.
https://cloud.boltiot.com/remote/ff012827-2971-4e0a-bd9c-0e2dddcb146f/digitalWrite?pin=0&state=HIGH&deviceName=BOLT14883062
https://cloud.boltiot.com/remote/ff012827-2971-4e0a-bd9c-0e2dddcb146f/digitalWrite?pin=0&state=LOW&deviceName=BOLT14883062

Credits

Shreya Sonawane
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.