Created
July 7, 2016 00:12
-
-
Save brentpicasso/6b12ff6f7829c2efb798dde3577df7ad to your computer and use it in GitHub Desktop.
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
--RPM simulator! | |
rpm = 0 | |
rpmDir = 100 | |
maxRpm = 10000 | |
rpmId = addChannel("RPM", 10, 0, 0, 10000) | |
setTickRate(50) | |
function onTick() | |
setChannel(rpmId, rpm) | |
rpm=rpm + rpmDir | |
if rpm > maxRpm or rpm < 0 then rpmDir = -rpmDir end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment