Guest User

Untitled

a guest
May 23rd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. local pin = 7 -- GPIO13
  2. local status = gpio.LOW
  3. local delaay = 1000 --1 segundo
  4.  
  5. gpio.mode(pin, gpio.OUTPUT)
  6. gpio.write(pin, status)
  7.  
  8. tmr.alarm(0, delaay, 1, function()
  9. if status == gpio.LOW then
  10. status = gpio.HIGH
  11. else
  12. status = gpio.LOW
  13. end
  14. gpio.write (pin, status)
  15. end)
Add Comment
Please, Sign In to add comment