Pratyaksha Sharma
Published © GPL3+

Controlling intensity of light without using Arduino

This project is all about to control the intensity of light by only using bolt module provided in the Bolt IOT kit.

IntermediateProtip2 hours274
Controlling intensity of light without using Arduino

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud

Hand tools and fabrication machines

Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)
Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)
led

Story

Read more

Custom parts and enclosures

controlling intensity of light

by attaching the required wires at correct place with the bulb and breadboard.

Schematics

controlling light intensity

pin jumping wires at its accurate postion(written on the description of project),then use mobile app to lower or higher the intensity.

Code

controlling the intensity of light

HTML
this is the code to run the command which controls the bolt iot light intesity contollings.
<html>

    <head>

        <title>my innovation project</title>

        <script type="text/javascript" src="https://cloud.boltiot.com/static/js/boltCommands.js"></script>

        <script>
        setKey('{{ApiKey}}','{{Name}}');

        var last_pwm_value=-1;
        function updateBuzzer(){
            var pwm_value=document.getElementById('pwm_value').value;
            if(last_pwm_value!=pwm_value){
                analogWrite(0,pwm_value);
                document.getElementById('pwm_value_display').innerHTML=pwm_value;
            }
            last_pwm_value=pwm_value;
        }
        setInterval(updateBuzzer,1000);
        </script>
    </head>
    <body>
        pwm value:
        <input type='range' id='pwm_value' min="0" max="255" value="0">
        <div id='pwm_value_display'>0</div>
    </body>

</html>

Credits

Pratyaksha Sharma

Pratyaksha Sharma

1 project • 0 followers
I am an enthusiast learner. I have been developing since my first year of college.

Comments