Vaishali Gaur
Published © Apache-2.0

Light Monitoring System

This is a light monitoring system which alarms you using a buzzer when there is ananomaly in the light intensity in such a smart way.

IntermediateShowcase (no instructions)5 hours935
Light Monitoring System

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Breadboard (generic)
Breadboard (generic)
×1
LDR, 5 Mohm
LDR, 5 Mohm
×1
Resistor 10k ohm
Resistor 10k ohm
×1
Jumper wires (generic)
Jumper wires (generic)
×6
Buzzer
Buzzer
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Bolt IoT Android App
Bolt IoT Android App
SMS Messaging API
Twilio SMS Messaging API

Story

Read more

Schematics

Hardware part

Breadboard:- The Functions of a Breadboard. A breadboard is a platform you can use to build and test electronic circuits, usually without having to do any soldering. Certain parts of the breadboard are wired together so that electricity can flow from component to component in orderly rows.
Buzzer:- A buzzer or beeper is an audio signalling device, which may be mechanical, electromechanical, or piezoelectric (piezo for short). Typical uses of buzzers and beepers include alarm devices, timers, and confirmation of user input such as a mouse click or keystroke.
LDR:- These resistors are mainly used when there is a need to sense the absence and presence of the light such as burglar alarm circuits, alarm clock, light intensity meters, etc. LDR resistors mainly involves in various electrical and electronic projects.
Resistor 10k:- A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines, among other uses.
Jumper wires:- The term "jumper wire" simply refers to a conducting wire that establishes an electrical connection between two points in a circuit. You can use jumper wires to modify a circuit or to diagnose problems in a circuit. The following steps outline how you can safely use jumper wires in different electrical applications.

System

Code

Python

Python
import  json, time, requests
from boltiot import Sms, Bolt
import smtplib
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart

email = ''
password = ''
send_to_email = ' '
subject = 'intrusion'
message = 'Someone Entered !!'

msg = MIMEMultipart()
msg['From'] = email
msg['To'] = send_to_email
msg['Subject'] = subject

msg.attach(MIMEText(message, 'plain'))

SID=" "
AUTH_TOKEN=" "
FROM_NUMBER=" "
TO_NUMBER=" "

sms = Sms(SID, AUTH_TOKEN, TO_NUMBER, FROM_NUMBER)

while True:
    response = requests.get('http://cloud.boltiot.com/remote/e0f2449f-c1b0-483c-8bd8-f4ba5fc32a89/digitalRead?pin=0&deviceName=BOLT6094123')
    data=json.loads(response.text)
    print(data)
    sensor_value = int(data['value'])
    if sensor_value == 1:
        print("MOTION DETECTED")
        print("sending SMS")
        server = smtplib.SMTP('smtp.gmail.com', 587)
        server.starttls()
        server.login(email, password)
        text = msg.as_string()
        server.sendmail(email, send_to_email, text)
        sms.send_sms("SOMEONE ENTERED")
        server.quit()
    elif sensor_value ==0:
        print("SENSOR IS READY")
    time.sleep(5)

Credits

Vaishali Gaur

Vaishali Gaur

1 project • 0 followers

Comments