1. Go to cloud.boltiot.com and create a new product. While creating the product, choose product type as output device and interface type as GPIO. After creating the product, select the recently created product and then click on configure icon.
2. Enable API and generate API key.
3. Take the buzzer and extend the pins using female jumpers.
4. Now connect + to Digital 0 port of Bolt WiFi module and GND to GND port of Bolt WiFi module.
5. Go to code section and include the code below and link the module to the project and implement it to go to interface page.
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>
Now you will see a screen like shown in this picture:
Now you can control your buzzer from home and alert your factory workers as from the message received from some other IoT device like temperature sensor that the temperature of medicine storage room has gone above a certain level or in case of a fire outage.
Comments