JAI SINGH
Published © GPL3+

Manually control alarm using iot

Make our own manually control alarm using iot which use to give warning people when something wrong is happen in home or industry.

IntermediateProtip10 hours365
Manually control alarm using iot

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Buzzer
Buzzer
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1

Software apps and online services

Bolt IoT Android App
Bolt IoT Android App
Bolt Cloud
Bolt IoT Bolt Cloud

Hand tools and fabrication machines

Tape, Electrical Insulation
Tape, Electrical Insulation

Story

Read more

Schematics

imgage

Code

control_buzzer

HTML
EXPLANATION OF CODE ::: first of all I write Doctype(in line 1) then I write opening html tag.(in line 2) in html tag I write opening head tag(in line 3) ,in head tag I write title(in line 4) and a java script file which include some pre define function like digitalread.(in line 5). Then i write opening script tag.(in line 6) Then I set the Api key and device name (in line 7) , close the script tag(in line 8) ,close the head tag(in line 9) and start the body tag(in line 10). After that in body tag, i write center tag to make button align center.(in line 11 opening tag and in line 14 closing tag ) , in center tag for clickable button i use a javascript function named as onclick()(in line 12 or 13). finally i close the body tag(in line 15) and html tag.(in line 16).
<!DOCTYPE html>
<html>
    <head>
        <title>buzzer control </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');">high</button>
        <button onclick="digitalWrite(0, 'LOW');">low</button>
        </center>
    </body>
</html>

Credits

JAI SINGH
1 project • 0 followers

Comments