Things used in this project

Schematics

How They Works.
Iotflow

Code

rasbpi.pyPython
import RPi.GPIO as GPIO
import urllib2
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(5,GPIO.OUT)
true = 1
while(true):
                try:
                        response = urllib2.urlopen('http://salfarsmarthome.azurewebsites.net/buttonStatus.php') 
                        status = response.read()
                except urllib2.HTTPError, e:
                                        print e.code

                except urllib2.URLError, e:
                                        print e.args

                print status
                if status=='ON':
                                GPIO.output(5,True)
                elif status=='OFF':
                                GPIO.output(5,False)

Credits

Dsc05679 xxk38knz8i
Salman Faris
10 projects • 191 followers
Maker | Hardware Hacker | Electronics Enthusiast
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Sign up / LoginProjectsPlatformsTopicsContestsLiveAppsBetaBlog