Nagina.Bhargavi prasanna
Published

Light_Automation

Automate the lights in your home or office.

IntermediateProtip4 days625
Light_Automation

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Relay Module (Generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Bulb
×1
Bulb holder
×1
Mobile charger
×1
2-pin socket
×1

Software apps and online services

visual studio code

Hand tools and fabrication machines

Wire stripper
Screwdriver

Story

Read more

Schematics

Light_Automation

controling the light by using bolt iot platform

Code

Light_Automation

HTML
to control the light by using bolt iot platform
/ *start typing your code here */<!--Change the file extension to html-->
<!DOCTYPE html>
<html lang="en"

   <head>
      <title>Bolt IoT Led Example</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
      <script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>
      <script type="text/javascript">
         // The following line will set the api key and device name. It will be auto-initialized by Bolt cloud.
         setKey('{{6cade515-df44-4cf8-ba60-0caad29c33a1}}','{{BOLT1350513}}');
      </script>
   </head>
   <body>
      <div class="jumbotron vertical-center">
         <div class="container">
            <div class="row">
               <div class="col-xs-12">
                  <div  class="text-center">
                     <button type="submit" class="btn btn-success btn-xl" onclick="digitalWrite(4, 'HIGH');">ON</button>
                     <br> <br> <br>
                     <button type="submit" class="btn btn-danger btn-xl" onclick="digitalWrite(4, 'LOW');">OFF</button>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <style type="text/css">
         .vertical-center {
         min-height: 100%;
         min-height: 100vh;
         display: flex;
         align-items: center;
         }
         .btn-xl {
         padding: 10px 20px;
         font-size: 20px;
         width:20%;
         }
      </style>
   </body>
</html>

Credits

Nagina.Bhargavi prasanna

Nagina.Bhargavi prasanna

1 project • 0 followers

Comments