Last active
January 31, 2019 00:20
-
-
Save baymac/ca82cfc7b79781c496965ba4cd78f67a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import androidhelper | |
| import time | |
| droid = androidhelper.Android() | |
| droid.wakeLockAcquireFull() | |
| arrived = 0 | |
| while True: | |
| t = time.strftime("%I:%M %p") | |
| if t == "06:00 AM": | |
| print ('Time arrived') | |
| droid.phoneCallNumber("9876543210") | |
| print('calling') | |
| t_end = time.time() + 60 | |
| while time.time() < t_end: | |
| arrived = 1 | |
| print('talking') | |
| droid.ttsSpeak("Hi Alice, it is time to wake up") | |
| time.sleep(4) | |
| if arrived == 1: | |
| exit(0) | |
| print('Time not arrived') | |
| time.sleep(20) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment