Pranav Pai VernekarDevashish GuptaVKSingh
Published © MIT

Home Automation

Build a smart lamp and make your life easy.

IntermediateFull instructions provided1 hour9,764
Home 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

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud

Hand tools and fabrication machines

Screwdriver
Wire stripper

Story

Read more

Schematics

Schematics

Code

Controller

HTML
Change the digital pin in the code according to your circuit.
<!--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('{{ApiKey}}','{{Name}}');
      </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

Pranav Pai Vernekar

Pranav Pai Vernekar

10 projects • 146 followers
Co-Founder & CEO of Bolt IoT Platform. We have recently launched on Kickstarter.
Devashish Gupta

Devashish Gupta

10 projects • 72 followers
Electronics student at NIT, Rourkela
VKSingh

VKSingh

7 projects • 93 followers
Senior Software Developer

Comments