#import RPi.GPIO as GPIO
from datetime import datetime
from time import strftime
import time
#Setting up GPIO
#GPIO.setmode(GPIO.BCM)
#GPIO.setup(23, GPIO.IN)
#Datetime variables
now_strf = strftime("%I:%M %p")
quest = raw_input("What time would you like to wake up? ")
while True:
if quest == now_strf:
print "Ring"
time.sleep(1)
else:
print now_strf
time.sleep(1)
My problem is it prints "Ring" when i set the alarm for the time it is now, but when I set it for a minute or two later, it doesn't go off. What am I doing wrong?