Skip to content

Instantly share code, notes, and snippets.

@macndesign
Last active August 29, 2015 14:10
Show Gist options
  • Save macndesign/490615dd09de5855a162 to your computer and use it in GitHub Desktop.
Save macndesign/490615dd09de5855a162 to your computer and use it in GitHub Desktop.
# Author: Eduardo Frazão
# OBS: this is for my android phone with Qpython3.
# that's my personal trainer \o/
from time import sleep
from subprocess import call
import sl4a
droid = sl4a.Android()
call("clear")
print("\n\tSérie básica de Flexões.\n\n")
droid.ttsSpeak("Basic series of push-ups.")
sleep(2.7)
print("*\tPrepare-se, 10 segundos para começar!")
droid.ttsSpeak("get ready; 10 seconds to begin.")
sleep(4.6)
droid.ttsSpeak("5 seconds.")
sleep(4.7)
droid.ttsSpeak("Begin")
for s in range(3):
for r in range(15):
droid.ttsSpeak("up.")
sleep(1.5)
droid.ttsSpeak("down.")
sleep(1.6)
if s < 2:
droid.ttsSpeak("interval; 1 minute to return.")
print("*\tIntervalo, 1 minuto para retorno.")
else:
droid.ttsSpeak("last series.")
print("*\tUltima série!")
sleep(29.3)
droid.ttsSpeak("30 seconds to return.")
sleep(29.3)
droid.speak("begin.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment