Sinduja R
Published © GPL3+

Monitoring Photosynthesis via Bolt IoT and Twillo

Photosynthesis is essential for the growth of plants. In this modern era, why shouldn't we help them by providing optimum conditions?

BeginnerFull instructions provided2 hours459
Monitoring Photosynthesis via Bolt IoT and Twillo

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Temperature Sensor
Temperature Sensor
×1
Buzzer
Buzzer
×1
LED (generic)
LED (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×7
Resistor 330 ohm
Resistor 330 ohm
×1

Software apps and online services

SMS Messaging API
Twilio SMS Messaging API
VMware Workstation 12 Player

Story

Read more

Schematics

Schematics

Code

ProjectTemo.py

Python
This is main code(in VMware) to monitor the Temperature
from boltiot import Bolt,Sms
import json, time
import conf

min_limit=10
max_limit=20

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)
	

	try:
		sensor_value=(100*int(data['value']))/1024
		if sensor_>value > max_limit or sensor_value < min_limit:
			print("Alert")	
			response=mybolt.digitalWrite('0','HIGH')
			print("Making request to Twilio")
			response=sms.sens_sms("Sent from Twilio trail account- The Current Temperature value is "+str(sensor_value))
			print("Response received is "+str(response))
			print("Status of Twilio "+str(response.status))

	except Exception as e:
		print("Error ")
		print(e)

	response=mybolt.digitalWrite('0','LOW')
	time.sleep(10)	

Credits

Sinduja R
1 project • 0 followers

Comments