Can you give me an idea on how to check the statuses of specific GPIO pins if it is HIGH or LOW? My project is all about checking the statuses of GPIO pins (6 GPIO pins). I want to check all of the pins at once and send a SMS message the statuses of the pins if it is HIGH or LOW. This the head start of my program.
If I send a message powerrefreshall it will trigger this:
SendSMS(ser,14)
print "Refresh ALL Relays"
this is my SendSMS method:
def SendSMS (ser,value):
ser.write("AT\r")
line = ser.read(size = 64)
print line
ser.write('AT+CMGS = "09073096***"\r')
if (value == 14):
if (GPIO.input(3) == 0):
ser.write('lightbulbon')
elif (GPIO.input(3) == 1):
ser.write('lightbulboff')
I don't know how to check the 5 other pins all at once. I am lost.