Bhanu Teja
Published © GPL3+

Room Temperature Buzzer

The buzzer buzzes whenever the room temperature crosses the threshold value.

BeginnerFull instructions provided30 minutes494
Room Temperature Buzzer

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Buzzer
Buzzer
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Temperature Sensor
Temperature Sensor
×1
Breadboard (generic)
Breadboard (generic)
×1

Story

Read more

Schematics

Final Circuit Should look like

Code

CODE

Python
Note that the conf.py file be made by you and it should consist of your BOLT IOT API and BOLT PRODUCT ID
from boltiot import Bolt
import json, time
import conf


mybolt = Bolt(conf.API_KEY, conf.DEVICE_ID)

while True:
    print("sensor value")
    response = mybolt.analogRead('A0')
    data = json.loads(response)
    print ("Sensor value is: " + str(data['value']))
    sensor_value = int(data['value'])
    print ("Sensor: " + str(sensor_value))
    Temperature = (100*sensor_value)/1024
    print("Temperature value is:" + str(Temperature))
    if Temperature > 25:
              response = mybolt.digitalWrite('0', 'HIGH')
    else:
              response = mybolt.digitalWrite('0', 'LOW')
    time.sleep(5)

Credits

Bhanu Teja
1 project • 0 followers

Comments