Created
January 30, 2017 04:56
-
-
Save cesarvargas00/dce30413288ed8f7ed066039dfa26b79 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
| isPulsing = false | |
| function OnEvent(event, arg) | |
| OutputLogMessage "Start Pulsing." | |
| if not isPulsing then | |
| isPulsing = true | |
| PulseKeyboard() | |
| end | |
| end | |
| function PulseKeyboard() | |
| i = 0 | |
| low = 0 | |
| high = 250 | |
| variation = 5 | |
| sleep_time_ms = 15 | |
| increment = true | |
| while true do | |
| SetBacklightColor(i,i,i,"kb") | |
| Sleep(sleep_time_ms) | |
| if increment then | |
| i = i + variation | |
| else | |
| i = i - variation | |
| end | |
| if i >= high then increment = false end | |
| if i <= low then increment = true end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment