While watching a movie or on a lazy night fighting for who will turn the lights off you need this project so you can control your lights form you mobile phone while sitting anywhere in the house.
in this project we will build a system about controlling your LED lights with BOLT module.
At the end of the project we will be able to control the lights.
REQUIRED COMPONENTS
These are the components required
1. The Bolt Wifi module
2. 1 x 330 ohm Resistor
3. 1 x LED
1. Make sure you have not powered on your module while connecting the circuits. if you have then turn it off otherwise it can damage your module.
2. Take one leg of the resistor and wrap it around the longer leg of the LED.
3. Take the other leg of the LED and insert it into the ground pin of the module.
4. Take the other leg of the resistor and insert it in digital pin 0 of the module.
5. Turn on the power now, and check that the green light of the module is blinking.
Step2 : Connect your device to the Bolt cloud
1. Go to cloud.boltiot.com and create a new product.
2. Choose product type as Output Device and interface type as GPIO.
3. After the product is created select the recently created product and then click on configure icon.
4. Go to the code tab and write the following code to control the LED.
5. Select javascript as header file.
Step 3 : Code<!DOCTYPE html>
<html>
<head>
<title>Bolt IoT Platform</title>
<script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
<script>
setKey('{{ApiKey}}','{{Name}}');
</script>
</head>
<body>
<center>
<button onclick="digitalWrite(0, 'HIGH');">ON</button>
<button onclick="digitalWrite(0, 'LOW');">OFF</button>
</center>
</body>
</html>1. Write the above code.
2. Give a suitable name to your code and.html as file extension.
3. Click on save icon to save the code.
4. Go back to the dashboard by clicking on 'X' icon.
5. In the products tab, choose the product created by you now and then click on the link icon.
6. Select your Bolt device and then click on Done.
Step 4 : Controlling it from the bolt cloud1. Click on view this device icon.
2. A page will open showing two buttons ON and OFF.
3. choose accordingly to see changes.
And you're done



_DaEHxMyxHi.png)
Comments