Ishan Binu Sainudeen
Published © GPL3+

Laser Trip Alarm

Wanted to keep your house safe even if you're not at home? Here's your chance.

IntermediateFull instructions provided34
Laser Trip Alarm

Things used in this project

Hardware components

LDR, 5 Mohm
LDR, 5 Mohm
Solderless Breadboard Half Size
Solderless Breadboard Half Size
Bolt WiFi Module
Bolt IoT Bolt WiFi Module
Through Hole Resistor, 150 ohm
Through Hole Resistor, 150 ohm
Jumper wires (generic)
Jumper wires (generic)
laser pointer

Software apps and online services

Bolt IoT Android App
Bolt IoT Android App
Bolt Cloud
Bolt IoT Bolt Cloud

Hand tools and fabrication machines

Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Wire Stripper & Cutter, 18-10 AWG / 0.75-4mm² Capacity Wires
Tape, Double Sided
Tape, Double Sided


Read more


Breadboard connections

They're the breadboard connections.

Bolt module connections


This is the main code
import conf, json, time
from boltiot import Sms, Bolt

minimum_limit = 80
maximum_limit = 136
flag = 0

mybolt = Bolt(conf.API_KEY, conf.DEVICE_ID)
sms = Sms(conf.SID, conf.AUTH_TOKEN, conf.TO_NUMBER, conf.FROM_NUMBER)

while True:
    print ("Reading sensor value")
    response = mybolt.analogRead('A0')
    data = json.loads(response)
    print("Sensor value is: " + str(data['value']))
        sensor_value = int(data['value'])
        if sensor_value > maximum_limit or sensor_value < minimum_limit:
            print("Making request to Twilio to send a SMS")
            response = sms.send_sms("Someone has entered... Call 100 for police$
            print("Response received from Twilio is: " + str(response))
            print("Status of SMS at Twilio is :" + str(response.status))
            flag = 1
    except Exception as e:
        print ("Error occured: Below are the details")
        print (e)

These are the configurations you will need
SID = 'You can find SID in your Twilio Dashboard' 
AUTH_TOKEN = 'You can find  on your Twilio Dashboard' 
FROM_NUMBER = 'This is the no. generated by Twilio. You can find this on your Twilio Dashboard'
TO_NUMBER = 'This is your number. Make sure you are adding +91 in beginning'
API_KEY = 'This is your Bolt Cloud accout API key'
DEVICE_ID = 'This is the ID of your Bolt device' 

Bolt cloud code

This is the code that is used in the Bolt cloud. Remember not to change the variable name of apikey and name as it will automatically be taken by the cloud.
<!DOCTYPE html>
        <title>Laser Trip</title>
        <script type="text/javascript" src=""></script>
        <button onclick="digitalWrite(1, 'HIGH');">Spook The Tresspasser</button>
        <button onclick="digitalWrite(1, 'LOW');">OFF</button>


Ishan Binu Sainudeen

Ishan Binu Sainudeen

1 project • 0 followers