Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local pin = 7 -- GPIO13
- local status = gpio.LOW
- local delaay = 1000 --1 segundo
- gpio.mode(pin, gpio.OUTPUT)
- gpio.write(pin, status)
- tmr.alarm(0, delaay, 1, function()
- if status == gpio.LOW then
- status = gpio.HIGH
- else
- status = gpio.LOW
- end
- gpio.write (pin, status)
- end)
Add Comment
Please, Sign In to add comment