edge lab LIVE! starts Tuesday in Munich. Grab a workshop seat and take home the board you build on. Code FRIEND-HACKSTER saves 20%. () Learn more!
Shreyas Acharya
Published © GPL3+

Fire Alarm System

Fire Alarm System is system which help million's of people day-in day-out in factories.

BeginnerShowcase (no instructions)3 hours286
Fire Alarm System

Things used in this project

Hardware components

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

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Ubuntu Core
Ubuntu Core

Story

Read more

Schematics

Fire Alarm System

Code

Fire Alarm System

Python
from boltiot import Bolt
import json
import time

api_key = "####################################"
device_id ="BOLT########"

minimum_limit = 300
maximum_limit = 350

mybolt = Bolt(api_key,device_id)

while True :
    print("Reading Sensor Value....")
    response = mybolt.analogRead('AO')
    data = json.loads(response)
    print("Sensor value is " + str(data['value']))
    sensor_value = int(data['value'])
    if sensor_value > minimum_limit:
       print(mybolt.digitalWrite('0','HIGH'))
    if sensor_value < minimum_limit:
       print(mybolt.digitalWrite('0','LOW'))
else:
       print("Error Occurred:   ")
       print(e)
time.sleep(2)

Credits

Shreyas Acharya
1 project • 0 followers

Comments