Skip to content

Instantly share code, notes, and snippets.

@cesarvargas00
Created January 30, 2017 04:56
Show Gist options
  • Select an option

  • Save cesarvargas00/dce30413288ed8f7ed066039dfa26b79 to your computer and use it in GitHub Desktop.

Select an option

Save cesarvargas00/dce30413288ed8f7ed066039dfa26b79 to your computer and use it in GitHub Desktop.
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