Created
April 29, 2018 16:51
-
-
Save marguslt/47c8b9eb5471d7772edd332dc6b23540 to your computer and use it in GitHub Desktop.
Suunto App Zone Pomodoro timer
This file contains 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
/* | |
Own variables: | |
WorkCycleLength = 25 | |
BreakCycleLength = 5 | |
While in sport mode do this once per second | |
*/ | |
if (Suunto.mod(SUUNTO_LAP_NUMBER,2) != 0) { | |
prefix = "W"; | |
RESULT = 60 * WorkCycleLength - SUUNTO_LAP_DURATION; | |
if (RESULT <= 0){ | |
Suunto.light(); | |
} | |
if (RESULT <= 0 && RESULT >= -5){ | |
Suunto.alarmBeep(); | |
} | |
}else{ | |
prefix = "B"; | |
RESULT = 60 * BreakCycleLength - SUUNTO_LAP_DURATION; | |
if (RESULT <= 0){ | |
Suunto.light(); | |
} | |
if (RESULT <= 0 && RESULT >= -2){ | |
Suunto.alarmBeep(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment