Current Lua downloadable firmware will be posted here

User avatar
By zeroday
#4343
alonewolfx2 wrote:How can i use more than one timer? Can you give an example?

zeroday wrote:Change log:
2014-12-09
increase alarm num in tmr module to 7.


Code: Select alltmr.alarm(0,1000,1,function() print("alarm 0") end)
tmr.alarm(1,2000,1,function() print("alarm 1") end)

--tmr.stop(0)
--tmr.stop(1)
User avatar
By zeroday
#4543 Change log:
2014-12-11
    1, fix uart.setup(), now setup can set pins in other mode back to uart mode.
    2, add wifi.sta.status() api, to get connection status in station mode.
    3, modify tmr.now() to return a uint31 rather than uint32. now-=0x80000000 if now>0x7fffffff.
User avatar
By gerardwr
#4555
zeroday wrote:Change log:
2014-12-11
    1, fix uart.setup(), now setup can set pins in other mode back to uart mode.


Sorry, but I do not understand what the change is, not even after looking at the updated documentation.

At 1st I thought that there was a way to re-purpose the RX/TX lines as GPIO, and now setting this back to uart was the change. Apparently it is not.

What is it, please?
User avatar
By zeroday
#4556
gerardwr wrote:
zeroday wrote:Change log:
2014-12-11
    1, fix uart.setup(), now setup can set pins in other mode back to uart mode.


Sorry, but I do not understand what the change is, not even after looking at the updated documentation.

At 1st I thought that there was a way to re-purpose the RX/TX lines as GPIO, and now setting this back to uart was the change. Apparently it is not.

What is it, please?


gpio1 and gpio3 are rx/tx. the default function of these 2pins is uart.
gpio module can use these 2 pins as general io pins, gpio.mode(..)

the issue is, when these pins set as gpio. it works as gpio.
but if you want to set these pins again in uart mode(uart.setup). it failed.

it stays in gpio mode (rx pin). issue 18