Skip to content

Instantly share code, notes, and snippets.

@Technicus
Created September 7, 2016 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Technicus/24f787f7e8e72e3e36e768f152fd7c81 to your computer and use it in GitHub Desktop.
Save Technicus/24f787f7e8e72e3e36e768f152fd7c81 to your computer and use it in GitHub Desktop.
print("GPIO TEST")
lighton = 0
gpio.mode(1, gpio.OUTPUT)
tmr.alarm(1, 1000, 1, function()
if lighton == 0 then
lighton = 1
gpio.write(1, gpio.LOW)
print("\tGPIO LOW\n")
else
lighton = 0
gpio.write(1, gpio.HIGH)
print("\tGPIO HIGH\n")
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment