diff --git a/alarm/alarm.py b/alarm/alarm.py new file mode 100644 index 00000000..5afac695 --- /dev/null +++ b/alarm/alarm.py @@ -0,0 +1,17 @@ +import os +import datetime +from playsound import playsound + +alarmH = int(input("What hour do you want the alarm to ring? ")) +alarmM = int(input("What minute do you want the alarm to ring? ")) +amPm = str(input("am or pm? ")) + +print("Waiting for alarm at ",alarmH,alarmM,amPm) +if (amPm == "pm"): + alarmH = alarmH + 12 +while(1 == 1): + if(alarmH == datetime.datetime.now().hour and + alarmM == datetime.datetime.now().minute) : + print("Rise and Shine :) ") + playsound('./sound.mp3') + break diff --git a/alarm/sound.mp3 b/alarm/sound.mp3 new file mode 100644 index 00000000..3d552572 Binary files /dev/null and b/alarm/sound.mp3 differ