라즈베리 파이에서 알람시간을 파이썬으로 코딩중인데 while문 작성이 너무 힘들네요. 어디가 잘못 된건지 설명부탁 드립니다 .
import time
import datetime
from grovepi import*
import math
buzzer_pin =2
button=4
pinMode(buzzer_pin,"OUTPUT")
pinMode(button,"INPUT")
c=int(input("Enter the hour you want to wake up at :"))
d=int(input("Enter the minutes you want to wake up at :"))
b=int(input("Enter the seconds you want to wake up at :"))
now= datetime.datetime.now()
h=now.strftime('%H')
h1=now.strftime('%M')
h2=now.strftime('%S')
while h==c and h1==d and h2>=b:
h==c and h1==d and h2<=b
digitalWrite(buzzer_pin,1)
button_status = digitalRead(button)
if button_status :
digitalWrite(buzzer_pin,0)