Welcome to Hackster!
Hackster is a community dedicated to learning hardware, from beginner to pro. Join us, it's free!
Manikant Kumar
Published © LGPL

Fire Alarm with used of bolt iot platform

This project is basically an extended application of Bolt iot platform this project enhance the reach of iot to the every aspect of life.

IntermediateProtip1,504
Fire Alarm with used of bolt iot platform

Things used in this project

Hardware components

Jumper wires (generic)
Jumper wires (generic)
×1
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
LM35 sensor
×1
Buzzer
Buzzer
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
Breadboard (generic)
Breadboard (generic)
×1

Software apps and online services

Bolt IoT Android App
Bolt IoT Android App
vmwar ubuntu

Story

Read more

Schematics

working of device

Code

Untitled file

Python
from boltiot import Bolt
import json, time
api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
device_id  = "BOLTXXXXX"
minimum_limit = 300
maximum_limit = 450
mybolt = Bolt(api_key,device_id)
while True: 
    print ("Reading sensor value")
    response = mybolt.analogRead('A0') 
    data = json.loads(response) 
    print("Sensor value is: " + str(data['value']))
    try: 
        sensor_value = int(data['value']) 
        if sensor_value > maximum_limit or sensor_value < minimum_limit:
           print(mybolt.digitalWrite('0','HIGH'))
        else
           print(mybolt.digitalWrite('0','LOW'))
    except Exception as e: 
         print ("Error occured: Below are the details")
        print (e)
    time.sleep(10)    

Credits

Manikant Kumar
5 projects • 7 followers
Contact

Comments

Please log in or sign up to comment.