So, here's a simple IoT based project.
Please follow these steps carefully:
(NOTE: First you will need to register and login to the bolt iot cloud and app.
For more info visit:https://docs.boltiot.com/docs)
#STEP1- CIRCUIT CONNECTIONS:
Take the 10kohm resistor and join it to the positive side of the led.
#STEP2-CONNECTING TO BOLT WI-FI MODULE:
a) Insert the negative end of the LED to the ground of your bolt wi-fi module.
b) Insert the free end of the resistor to the digital 0 of your bolt wi-fi module.
c)Power up the wi-fi module using a USB cable and a mobile charger / your PC.
Make sure it is connected to the internet.
#STEP3-SETTING UP BOLT DEVICE:
a) Visit:https://cloud.boltiot.com/
b) In the products tab select Add Product option, choose product type as output device and interface type as GPIO.
c) Head over to the code tab and write the following code after selecting the name and file extension to html:
<html>
<head>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script> <!--link to javascript file-->
<script type="text/javascript">setKey('{{ApiKey}}', '{{Name}}');</script></head> <!-- Here ApiKey and Device name will be set automatically -->
<body>
<center>
<button onclick="digitalWrite(0, 'HIGH');">ON</button> <!-- on click set pin 0 to high state i.e turn on the LED -->
<button onclick="digitalWrite(0, 'LOW');">OFF</button> <!-- on click set pin 0 to low state i.e turn off the LED -->
</center>
</body>
</html>
It should look like this:
d) Click on save your configuration to save your code.
Now head over to the products tab and select the product you just created and link it to your bolt wi-fi module using link button on the dashboard.
e) Click on the view this device option and try it through your browser.
#STEP4-CONTROLLING LED USING BOLTIOT APP:
You can also use the boltIoT app to console the same. Just follow these steps:
a)Install the boltIoT app from Play Store/App Store and sign in to your Bolt Cloud account.
b) Now select your bolt device:
c) Now you can ON/OFF LED using boltIoT app:
Comments
Please log in or sign up to comment.