Current Lua downloadable firmware will be posted here

User avatar
By Trickuncle
#35261 This code works:

Code: Select all    while 1 do
    gpio.write(3, gpio.HIGH)
    tmr.delay(1000000) -- wait 1,000,000 us = 1 second
    gpio.write(3, gpio.LOW)
    tmr.delay(1000000) -- wait 1,000,000 us = 1 second
    end


But if I change the delays to 100k from 1M, it runs for a few seconds and then reboots.
Any ideas why?
User avatar
By Trickuncle
#35312 Further testing...
Changing the delay from 1million to 900,000 reboots also
Changing the delay from 1 million to two calls of 500,000 each reboots.
There must be some way to write code for this beast without requiring *ONE SECOND* delays in the main loop...

Thanks to anyone who can tell me what I'm doing wrong!!!