From e86b2ec53cbf1e10bc73eb82802b4dd7f38c0d9d Mon Sep 17 00:00:00 2001 From: funshine Date: Thu, 20 Nov 2014 15:45:21 +0800 Subject: [PATCH] fix tmr.delay(), add tmr.wdclr(), fix UDP, update doc --- 0.9.2/512k-flash/nodemcu_512k.bin | Bin 520192 -> 520192 bytes README.html | 233 ++++--- README.md | 4 +- nodemcu_api_cn.html | 977 +++++++++++++++------------ nodemcu_api_cn.md | 51 +- nodemcu_api_en.html | 1042 ++++++++++++++++------------- nodemcu_api_en.md | 52 +- 7 files changed, 1389 insertions(+), 970 deletions(-) diff --git a/0.9.2/512k-flash/nodemcu_512k.bin b/0.9.2/512k-flash/nodemcu_512k.bin index 89bf0c289fc3818a095cd810fe2bfdd76ebef4b4..b51cddc35296bb58cc572ce025ca2eedba8dba46 100644 GIT binary patch delta 33114 zcmaHTdt8*o_wX|_&$EI)i_2AR>OKqNqM+=GiVCtIi+I5R6)&lQB5G-=Sz1wCbcqu4 zf;v{HifHXJ*dK zvspDgvub+o3qt5tNiZ6WFu$W99sk~0{abV7!j;XD+TTh>lM7gI+u0l$QqW5=2al~T z_(Utk{-zaw;@;8gTsd(Dm%tQxT#8toi204ipTIgHTy5)`{yz=nY(>&DE$*kCMp5Wg6U zu?6Ylrs7+X1?A%g;SfW?vvE0{Z7<1@4$u!=LP73JzoOETi3t~b3Jbqr%F!+C-+k^+ z&5?*}{~OW%%4HY4zi=?m6j~6qXkm$V(R|XQ{)V5S!RTjjfaigAeunxK&QJ}&r}-I* z*A?tv@;hoOS@qT%7%eP$zO)3*mO8_+hw*YJa^#HQ{kK+y``5QVy%6NZ6 z8{n=Shgxgd#vk)bbL50y3Y^~co@g`lGNeWIGGM5?1Ay52^o{Oi*ayIJ@~r?5ZrO-l zhI0VSJ{LlRRX~foBu7pIVCe~9s}l;|e|LP3Bg#ecd&cExIxgOFA0d@fF12_Uu z32+Xe2B03`5da6xX0n(m-ugsih}#SK1dSo)DA40Hh6KQU-TVxb;aSz+&oB+1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TiC#`@6V&SKlNkImP3(-{R5hn zAqi}H#HdqiAr1%kykS!MB*?G)1!}A@G;J0SmBI`JH zU9)wDzP8!A2!I2sWXX|QXMr<$plLeu`*xPnhm|y&Ys{8%D>-=%ZGr97(~>9LW~yH| z2y{5R+k9y*P%uQGsTS$W2X;CY?M|~TmaXCw(^!|W+6$uS7_GF~x(U2f2cI=H>fHc! zr3g)BtD3FjwCB+b6^}*w3K2R^Z;71Inr4xXm`$*+6zRh&L2ri!vZtFdfui`CG?w1E z?Kfzb9B^6!@dHJ3v8Xu1@x4Xo)^toMoexT9$-$$)LIg(i249rU#-%UC#8?Tp0S-e5 z#!H;_Y%0bfHzPLo7rJ(x>lN76@{_LoaqvI^g4{da=R? z>o2HI?q+u1$ti+LDcSDh?%u4Q^ooy{^k%BG+{f#Bvz7VU!2QZ4pBjF~6RKSF<f4onEG1YrFeHL|+xcghxfC7g+r@o!IFEC&E*-S(l@^(n<*>X?t%6GY6hR-sOI++Fsji7f^ks!6HEO?-;A3aMwa5l-J)hT? zt!r}@KpNhoi+fTQH}zww0SxMbu70f3SkV0 zf9)TTZpcXs9!Uv|uxh{QmRZ4#IV$W4+YE(i#*sfGaS(f;+h!s03BNJXP@EPt@-9Nd z^!t2wKNi(XKfkZK&~M43NfFW%M;jSzR3(0-#vGNIb^c?Anmyrz#E#xv3G}TMO=izj zDhK_l_KKSogtKqREADME

NodeMcu

+README

NodeMcu

A lua based firmware for wifi-soc esp8266

-

version 0.9.2 build 2014-11-19

+

version 0.9.2 build 2014-11-20

Change log

change log

变更日志

@@ -1066,98 +1131,106 @@ for most esp8266 modules, just pull GPIO0 down and restart.

braudrate:9600

Start play

Connect to your ap

-
    print(wifi.sta.getip())
-    --0.0.0.0
-    wifi.setmode(wifi.STATION)
-    wifi.sta.config("SSID","password")
-    print(wifi.sta.getip())
-    --192.168.18.110
-
+
    print(wifi.sta.getip())
+    --0.0.0.0
+    wifi.setmode(wifi.STATION)
+    wifi.sta.config("SSID","password")
+    print(wifi.sta.getip())
+    --192.168.18.110
+
+

Manipulate hardware like a arduino

-
    pin = 1
-    gpio.mode(pin,gpio.OUTPUT)
-    gpio.write(pin,gpio.HIGH)
-    print(gpio.read(pin))
-
+
    pin = 1
+    gpio.mode(pin,gpio.OUTPUT)
+    gpio.write(pin,gpio.HIGH)
+    print(gpio.read(pin))
+
+

Write network application in nodejs style

-
    -- A simple http client
-    conn=net.createConnection(net.TCP, false) 
-    conn:on("receive", function(conn, payload) print(c) end )
-    conn:connect(80,"115.239.210.27")
-    conn:send("GET / HTTP/1.1\r\nHost: www.baidu.com\r\n"
-        .."Connection: keep-alive\r\nAccept: */*\r\n\r\n")
-
+
    -- A simple http client
+    conn=net.createConnection(net.TCP, 0) 
+    conn:on("receive", function(conn, payload) print(c) end )
+    conn:connect(80,"115.239.210.27")
+    conn:send("GET / HTTP/1.1\r\nHost: www.baidu.com\r\n"
+        .."Connection: keep-alive\r\nAccept: */*\r\n\r\n")
+
+

Or a simple http server

-
    -- A simple http server
-    srv=net.createServer(net.TCP) 
-    srv:listen(80,function(conn) 
-      conn:on("receive",function(conn,payload) 
-        print(payload) 
-        conn:send("<h1> Hello, NodeMcu.</h1>")
-      end) 
-    end)
-
+
    -- A simple http server
+    srv=net.createServer(net.TCP) 
+    srv:listen(80,function(conn) 
+      conn:on("receive",function(conn,payload) 
+        print(payload) 
+        conn:send("<h1> Hello, NodeMcu.</h1>")
+      end) 
+    end)
+
+

Do something shining

-
  function led(r,g,b) 
-    pwm.setduty(0,r) 
-    pwm.setduty(1,g) 
-    pwm.setduty(2,b) 
-  end
-  pwm.setup(0,500,50) 
-  pwm.setup(1,500,50) 
-  pwm.setup(2,500,50)
-  pwm.start(0) 
-  pwm.start(1) 
-  pwm.start(2)
-  led(50,0,0) -- red
-  led(0,0,50) -- blue
-
+
  function led(r,g,b) 
+    pwm.setduty(0,r) 
+    pwm.setduty(1,g) 
+    pwm.setduty(2,b) 
+  end
+  pwm.setup(0,500,50) 
+  pwm.setup(1,500,50) 
+  pwm.setup(2,500,50)
+  pwm.start(0) 
+  pwm.start(1) 
+  pwm.start(2)
+  led(50,0,0) -- red
+  led(0,0,50) -- blue
+
+ -
  lighton=0
-  tmr.alarm(1000,1,function()
-    if lighton==0 then 
-      lighton=1 
-      led(50,50,50) 
-    else 
-      lighton=0 
-      led(0,0,0) 
-    end 
-  end)
-
+
  lighton=0
+  tmr.alarm(1000,1,function()
+    if lighton==0 then 
+      lighton=1 
+      led(50,50,50) 
+    else 
+      lighton=0 
+      led(0,0,0) 
+    end 
+  end)
+
+

If you want to run something when system started

-
  --init.lua will be excuted
-  file.open("init.lua","w")
-  file.writeline([[print("Hello, do this at the beginning.")]])
-  file.close()
-  node.restart()  -- this will restart the module.
-
+
  --init.lua will be excuted
+  file.open("init.lua","w")
+  file.writeline([[print("Hello, do this at the beginning.")]])
+  file.close()
+  node.restart()  -- this will restart the module.
+
+

With below code, you can telnet to your esp8266 now

-
    -- a simple telnet server
-    s=net.createServer(net.TCP) 
-    s:listen(2323,function(c) 
-       con_std = c 
-       function s_output(str) 
-          if(con_std~=nil) 
-             then con_std:send(str) 
-          end 
-       end 
-       node.output(s_output, 0)   -- re-direct output to function s_ouput.
-       c:on("receive",function(c,l) 
-          node.input(l)           -- works like pcall(loadstring(l)) but support multiple separate line
-       end) 
-       c:on("disconnection",function(c) 
-          con_std = nil 
-          node.output(nil)        -- un-regist the redirect output function, output goes to serial
-       end) 
-    end)
-
+
    -- a simple telnet server
+    s=net.createServer(net.TCP) 
+    s:listen(2323,function(c) 
+       con_std = c 
+       function s_output(str) 
+          if(con_std~=nil) 
+             then con_std:send(str) 
+          end 
+       end 
+       node.output(s_output, 0)   -- re-direct output to function s_ouput.
+       c:on("receive",function(c,l) 
+          node.input(l)           -- works like pcall(loadstring(l)) but support multiple separate line
+       end) 
+       c:on("disconnection",function(c) 
+          con_std = nil 
+          node.output(nil)        -- un-regist the redirect output function, output goes to serial
+       end) 
+    end)
+
+

Check this out

Tencent QQ group: 309957875

diff --git a/README.md b/README.md index 66b74d9e..f1448815 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # **NodeMcu** # ###A lua based firmware for wifi-soc esp8266 -version 0.9.2 build 2014-11-19 +version 0.9.2 build 2014-11-20 # Change log [change log](https://github.com/funshine/nodemcu-firmware/wiki/nodemcu_api_en#change_log)
[变更日志](https://github.com/funshine/nodemcu-firmware/wiki/nodemcu_api_cn#change_log) @@ -76,7 +76,7 @@ braudrate:9600 ```lua -- A simple http client - conn=net.createConnection(net.TCP, false) + conn=net.createConnection(net.TCP, 0) conn:on("receive", function(conn, payload) print(c) end ) conn:connect(80,"115.239.210.27") conn:send("GET / HTTP/1.1\r\nHost: www.baidu.com\r\n" diff --git a/nodemcu_api_cn.html b/nodemcu_api_cn.html index dbeeb515..19db1b99 100644 --- a/nodemcu_api_cn.html +++ b/nodemcu_api_cn.html @@ -1014,11 +1014,81 @@ body .markdown-body page-break-after: avoid; } } -nodemcu_api_cn

nodeMcu API说明

+nodemcu_api_cn

nodeMcu API说明

English Version

-

版本 0.9.2 build 2014-11-19

+

版本 0.9.2 build 2014-11-20

变更日志:

+

2014-11-20

+修正tmr.delay,支持2s以上的延时,但是长延时可能会引起beacon timer out,导致与AP之间重新连接。

+增加tmr.wdclr(),用来重置看门狗计数器,用在长循环中,以防芯片因看门狗重启。

+修正net模块UDP无法连接问题。

+createServer(net.TCP, timeout)函数增加连接超时参数设置。

2014-11-19

增加adc模块,adc.read(0)读取adc的值。

wifi模块增加wifi.sta.getap() 函数,用于获取ap列表。

@@ -1104,8 +1174,9 @@ node模块中删除了log函数。

返回值

nil

示例

-
    node.restart();
-
+
    node.restart();
+
+

参见

-

@@ -1121,8 +1192,9 @@ node模块中删除了log函数。

返回值

nil

示例

-
    node.dsleep(us);
-
+
    node.dsleep(us);
+
+

参见

-

@@ -1137,8 +1209,9 @@ node模块中删除了log函数。

返回值

number:芯片ID

示例

-
    id = node.chipid();
-
+
    id = node.chipid();
+
+

参见

-

@@ -1153,8 +1226,9 @@ node模块中删除了log函数。

返回值

number: 系统剩余内存字节数

示例

-
    heap_size = node.heap();
-
+
    heap_size = node.heap();
+
+

参见

-

@@ -1171,8 +1245,9 @@ function(): 用户自定义的按键回调函数。 如果为nil, 则取消用

返回值

nil

示例

-
    node.key("long", function(){print('hello world')})
-
+
    node.key("long", function(){print('hello world')})
+
+

参见

-

@@ -1188,9 +1263,10 @@ High: LED打开时间,单位:毫秒,时间分辨率:80~100ms

返回值

nil

示例

-
    -- LED常亮.
-    node.led(0);
-
+
    -- LED常亮.
+    node.led(0);
+
+

参见

-

@@ -1206,9 +1282,10 @@ High: LED打开时间,单位:毫秒,时间分辨率:80~100ms

返回值

nil

示例

-
    -- 注意:该函数不支持在命令行中使用。
-    sk:on("receive", function(conn, payload) node.input(payload) end)
-
+
    -- 注意:该函数不支持在命令行中使用。
+    sk:on("receive", function(conn, payload) node.input(payload) end)
+
+

参见

-

@@ -1224,13 +1301,14 @@ serial_debug: 1:将输出送至串口; 0:输出不送至串口

返回值

nil

示例

-
    function tonet(str)
-      sk:send(str)
-      -- print(str) 错误!!! 千万不要在此函数中再使用print函数
-      -- 因为这样会导致函数的嵌套调用!!
-    end
-    node.ouput(tonet, 1)  -- serial also get the lua output.
-
+
    function tonet(str)
+      sk:send(str)
+      -- print(str) 错误!!! 千万不要在此函数中再使用print函数
+      -- 因为这样会导致函数的嵌套调用!!
+    end
+    node.ouput(tonet, 1)  -- serial also get the lua output.
+
+

参见

-

@@ -1246,9 +1324,10 @@ serial_debug: 1:将输出送至串口; 0:输出不送至串口

返回值

nil

示例

-
    -- 删除foo.lua文件
-    file.remove("foo.lua")
-
+
    -- 删除foo.lua文件
+    file.remove("foo.lua")
+
+

参见

- file.open()

@@ -1271,11 +1350,12 @@ mode:

返回值

nil

示例

-
    -- 打开'init.lua',并打印文件的第一行。
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- 打开'init.lua',并打印文件的第一行。
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

参见

- file.close()

@@ -1291,11 +1371,12 @@ mode:

返回值

nil

示例

-
    -- 打开'init.lua',并打印文件的第一行,然后关闭文件。
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- 打开'init.lua',并打印文件的第一行,然后关闭文件。
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

参见

- file.open()

@@ -1312,11 +1393,12 @@ mode:

逐行返回文件内容。返回值末尾包含EOL(‘\n’)

如果读到EOF返回nil。

示例

-
    -- 打开'init.lua',读取并打印文件的第一行,然后关闭文件。
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- 打开'init.lua',读取并打印文件的第一行,然后关闭文件。
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

参见

- file.open()

@@ -1333,12 +1415,13 @@ mode:

true: 写入成功

nil: 写入失败

示例

-
    -- 以'a+'的模式打开'init.lua'
-    file.open("init.lua", "a+")
-    -- 将'foo bar'写到文件的末尾
-    file.writeline('foo bar')
-    file.close()
-
+
    -- 以'a+'的模式打开'init.lua'
+    file.open("init.lua", "a+")
+    -- 将'foo bar'写到文件的末尾
+    file.writeline('foo bar')
+    file.close()
+
+

参见

- file.open()

@@ -1355,12 +1438,13 @@ nil: 写入失败

true: 写入成功

nil: 写入失败

示例

-
    -- 以'a+'的模式打开'init.lua'
-    file.open("init.lua", "a+")
-    -- 将'foo bar'写到文件的末尾
-    file.writeline('foo bar')
-    file.close()
-
+
    -- 以'a+'的模式打开'init.lua'
+    file.open("init.lua", "a+")
+    -- 将'foo bar'写到文件的末尾
+    file.writeline('foo bar')
+    file.close()
+
+

参见

- file.open()

@@ -1376,13 +1460,14 @@ nil: 写入失败

返回值

nil

示例

-
    -- 以'a+'的模式打开'init.lua'
-    file.open("init.lua", "a+")
-    -- 将'foo bar'写到文件的末尾
-    file.write('foo bar')
-    file.flush()
-    file.close()
-
+
    -- 以'a+'的模式打开'init.lua'
+    file.open("init.lua", "a+")
+    -- 将'foo bar'写到文件的末尾
+    file.write('foo bar')
+    file.flush()
+    file.close()
+
+

参见

- file.open()

@@ -1403,17 +1488,18 @@ offset: default 0

成功: 返回当前的文件读写位置

失败: 返回nil

示例

-
    -- 以'a+'的模式打开'init.lua'
-    file.open("init.lua", "a+")
-    -- 将'foo bar'写到文件的末尾
-    file.write('foo bar')
-    file.flush()
-    --将文件读写位置设置在文件开始
-    file.seek("set")
-    --读取并打印文件的第一行
-    print(file.readline())
-    file.close()
-
+
    -- 以'a+'的模式打开'init.lua'
+    file.open("init.lua", "a+")
+    -- 将'foo bar'写到文件的末尾
+    file.write('foo bar')
+    file.flush()
+    --将文件读写位置设置在文件开始
+    file.seek("set")
+    --读取并打印文件的第一行
+    print(file.readline())
+    file.close()
+
+

参见

- file.open()

@@ -1429,11 +1515,12 @@ offset: default 0

返回值

返回包含{文件名:文件大小}的lua table

示例

-
    l = file.list();
-    for k,v in pairs(l) do
-      print("name:"..k..", size:"..v)
-    end
-
+
    l = file.list();
+    for k,v in pairs(l) do
+      print("name:"..k..", size:"..v)
+    end
+
+

参见

- file.remove()

@@ -1451,8 +1538,9 @@ offset: default 0

返回值

返回设置之后的mode值

示例

-
    wifi.setmode(wifi.STATION)
-
+
    wifi.setmode(wifi.STATION)
+
+

参见

- wifi.getmode()

@@ -1467,8 +1555,9 @@ offset: default 0

返回值

返回wifi的工作模式

示例

-
    print(wifi.getmode())
-
+
    print(wifi.getmode())
+
+

参见

- wifi.setmode()

@@ -1484,8 +1573,9 @@ succeed_callback: 配置成功的回调函数,配置成功并连接至AP后调

返回值

nil

示例

-
    wifi.startsmart(6, cb())
-
+
    wifi.startsmart(6, cb())
+
+

参见

- wifi.stopsmart()

@@ -1500,8 +1590,9 @@ succeed_callback: 配置成功的回调函数,配置成功并连接至AP后调

返回值

nil

示例

-
    wifi.stopsmart()
-
+
    wifi.stopsmart()
+
+

参见

- wifi.startsmart()

@@ -1518,8 +1609,9 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    wifi.sta.config("myssid","mypassword")
-
+
    wifi.sta.config("myssid","mypassword")
+
+

参见

- wifi.sta.connect()

@@ -1535,8 +1627,9 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    wifi.sta.connect()
-
+
    wifi.sta.connect()
+
+

参见

- wifi.sta.disconnect()

@@ -1552,8 +1645,9 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    wifi.sta.disconnect()
-
+
    wifi.sta.disconnect()
+
+

参见

- wifi.sta.config()

@@ -1569,8 +1663,9 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    wifi.sta.autoconnect()
-
+
    wifi.sta.autoconnect()
+
+

参见

- wifi.sta.config()

@@ -1587,9 +1682,10 @@ password: 字符串,长度小于64字节。

返回值

ip地址字符串,如:”192.168.0.111”

示例

-
    -- print current ip
-    print(wifi.sta.getip())
-
+
    -- print current ip
+    print(wifi.sta.getip())
+
+

参见

- wifi.sta.getmac()

@@ -1604,9 +1700,10 @@ password: 字符串,长度小于64字节。

返回值

mac地址字符串,如:”18-33-44-FE-55-BB”

示例

-
    -- 打印当前的mac地址
-    print(wifi.sta.getmac())
-
+
    -- 打印当前的mac地址
+    print(wifi.sta.getmac())
+
+

参见

- wifi.sta.getip()

@@ -1622,14 +1719,15 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    -- print ap list
-    function listap(t)
-      for k,v in pairs(t) do
-        print(k.." : "..v)
-      end
-    end
-    wifi.sta.getap(listap)
-
+
    -- print ap list
+    function listap(t)
+      for k,v in pairs(t) do
+        print(k.." : "..v)
+      end
+    end
+    wifi.sta.getap(listap)
+
+

参见

- wifi.sta.getip()

@@ -1643,17 +1741,19 @@ password: 字符串,长度小于64字节。

参数

cfg: 设置AP的lua table

示例:

-
     cfg={}
-     cfg.ssid="myssid"
-     cfg.pwd="mypwd"
-     wifi.ap.setconfig(cfg)
-
+
     cfg={}
+     cfg.ssid="myssid"
+     cfg.pwd="mypwd"
+     wifi.ap.setconfig(cfg)
+
+

返回值

nil

示例

-
    wifi.ap.config(ssid, 'password')
-
+
    wifi.ap.config(ssid, 'password')
+
+

参见

-

@@ -1668,8 +1768,9 @@ password: 字符串,长度小于64字节。

返回值

ip地址字符串,如:”192.168.0.111”

示例

-
    wifi.ap.getip()
-
+
    wifi.ap.getip()
+
+

参见

- wifi.ap.getmac()

@@ -1684,8 +1785,9 @@ password: 字符串,长度小于64字节。

返回值

mac地址字符串,如:”1A-33-44-FE-55-BB”

示例

-
    wifi.ap.getmac()
-
+
    wifi.ap.getmac()
+
+

参见

- wifi.ap.getip()

@@ -1701,9 +1803,10 @@ password: 字符串,长度小于64字节。

返回值

nil

示例

-
    -- delay 100us
-    tmr.delay(100)
-
+
    -- delay 100us
+    tmr.delay(100)
+
+

参见

- tmr.now()

@@ -1718,9 +1821,10 @@ password: 字符串,长度小于64字节。

返回值

uint32: value of counter

示例

-
    -- 打印计数器的当前值。
-    print(tmr.now())
-
+
    -- 打印计数器的当前值。
+    print(tmr.now())
+
+

参见

- tmr.delay()

@@ -1738,9 +1842,10 @@ function do(): 定时器到时回调函数。

返回值

nil

示例

-
    -- 每1000ms输出一个hello world
-    tmr.alarm(1000, 1, function() print("hello world") end )
-
+
    -- 每1000ms输出一个hello world
+    tmr.alarm(1000, 1, function() print("hello world") end )
+
+

参见

- tmr.now()

@@ -1755,537 +1860,573 @@ function do(): 定时器到时回调函数。

返回值

nil

示例

-
    -- 每隔1000ms打印hello world
-    tmr.alarm(1000, 1, function() print("hello world") end )
+
    -- 每隔1000ms打印hello world
+    tmr.alarm(1000, 1, function() print("hello world") end )
 
-    -- 其它代码
+    -- 其它代码
+
+    -- 停止闹钟
+    tmr.stop()
+
- -- 停止闹钟 - tmr.stop() -

参见

- tmr.now()

+

+

tmr.wdclr()

+

描述

+

清除看门狗计数器。

+

语法

+

tmr.wdclr()

+

参数

+

nil.

+

返回值

+

nil

+

示例

+
    for i=1,10000 do 
+      print(i)
+      tmr.wdclr()   -- 一个长时间的循环或者事务,需内部调用tmr.wdclr() 清楚看门狗计数器,防止重启。
+    end 
+
+ + +

参见

+

- tmr.delay()

GPIO 模块

-

常量

+

常量

gpio.OUTPUT, gpio.INPUT, gpio.INT, gpio.HIGH, gpio.LOW

gpio.mode()

-

描述

+

描述

将pin初始化为GPIO并设置输入输出模式。

-

语法

+

语法

gpio.mode(pin, mode)

-

参数

+

参数

pin: 0~11, IO编号

mode: 取值为:gpio.OUTPUT or gpio.INPUT, or gpio.INT(中断模式)

-

返回值

+

返回值

nil

-

示例

-
    -- 将GPIO0设置为输出模式
-    gpio.mode(0, gpio.OUTPUT)
+

示例

+
    -- 将GPIO0设置为输出模式
+    gpio.mode(0, gpio.OUTPUT)
+
-
-

参见

+

参见

- gpio.read()

gpio.read()

-

描述

+

描述

读取管脚电平高低。

-

语法

+

语法

gpio.read(pin)

-

参数

+

参数

pin: 0~11, IO编号

-

返回值

+

返回值

number:0:低电平, 1:高电平。

-

示例

-
    -- 读取GPIO0的电平
-    gpio.read(0)
-
+

示例

+
    -- 读取GPIO0的电平
+    gpio.read(0)
+
-

参见

+ +

参见

- gpio.mode()

gpio.write()

-

描述

+

描述

设置管脚电平

-

语法

+

语法

gpio.write(pin)

-

参数

+

参数

pin: 0~11, IO编号

level: gpio.HIGH or gpio.LOW

-

返回值

+

返回值

nil

-

示例

-
    -- 设置GPIP1为输出模式,并将输出电平设置为高
-    pin=1
-    gpio.mode(pin, gpio.OUTPUT)
-    gpio.write(pin, gpio.HIGH)
-
+

示例

+
    -- 设置GPIP1为输出模式,并将输出电平设置为高
+    pin=1
+    gpio.mode(pin, gpio.OUTPUT)
+    gpio.write(pin, gpio.HIGH)
+
-

参见

+ +

参见

- gpio.mode()

- gpio.read()

gpio.trig()

-

描述

+

描述

设置管脚中断模式的回调函数。

-

语法

+

语法

gpio.trig(pin, type, function(level))

-

参数

+

参数

pin: 0~11, IO编号

type: 取值为”up”, “down”, “both”, “low”, “high”, 分别代表上升沿、下降沿、双边沿、低电平、高电平触发方式。

function(level): 中断触发的回调函数,GPIO的电平作为输入参数。如果此处没有定义函数,则使用之前定义的回调函数。

-

返回值

+

返回值

nil

-

示例

-
    -- 使用GPIO0检测输入脉冲宽度
-    pulse0 = 0
-    du = 0
-    gpio.mode(0,gpio.INT)
-    function pin0cb(level)
-     du = tmr.now() – pulse0
-     print(du)
-     pulse0 = tmr.now()
-     if level == 1 then gpio.trig(0, "down ") else gpio.trig(0, "up ") end
-    end
-    gpio.trig(0, "down ",pin0cb)
+

示例

+
    -- 使用GPIO0检测输入脉冲宽度
+    pulse0 = 0
+    du = 0
+    gpio.mode(0,gpio.INT)
+    function pin0cb(level)
+     du = tmr.now()  pulse0
+     print(du)
+     pulse0 = tmr.now()
+     if level == 1 then gpio.trig(0, "down ") else gpio.trig(0, "up ") end
+    end
+    gpio.trig(0, "down ",pin0cb)
+
-
-

参见

+

参见

- gpio.mode()

- gpio.write()

PWM模块

pwm.setup()

-

描述

+

描述

设置管脚为pwm模式,最多支持6个pwm。

-

语法

+

语法

pwm.setup(pin, clock, duty)

-

参数

+

参数

pin: 0~11, IO编号

clock: 1~500, pwm频率

duty: 0~100, pwm占空比,百分比表示。

-

返回值

-

nil

-

示例

-
    -- 将管脚0设置为pwm输出模式,频率100Hz,占空比50-50
-    pwm.setup(0, 100, 50)
-
- -

参见

-

- pwm.start()

-

-

pwm.close()

-

描述

-

退出pwm模式。

-

语法

-

pwm.close(pin)

-

参数

-

pin: 0~11, IO编号

返回值

nil

示例

-
    pwm.close(0)
-
+
    -- 将管脚0设置为pwm输出模式,频率100Hz,占空比50-50
+    pwm.setup(0, 100, 50)
+
+

参见

- pwm.start()

-

-

pwm.start()

+

+

pwm.close()

描述

-

pwm启动,可以在对应的GPIO检测到波形。

+

退出pwm模式。

语法

-

pwm.start(pin)

+

pwm.close(pin)

参数

pin: 0~11, IO编号

返回值

nil

示例

-
    pwm.start(0)
-
+
    pwm.close(0)
+
+

参见

-

- pwm.stop()

-

-

pwm.stop()

+

- pwm.start()

+

+

pwm.start()

描述

-

暂停pwm输出波形。

+

pwm启动,可以在对应的GPIO检测到波形。

语法

-

pwm.stop(pin)

+

pwm.start(pin)

参数

pin: 0~11, IO编号

返回值

nil

示例

-
    pwm.stop(0)
-
+
    pwm.start(0)
+
+

参见

-

- pwm.start()

-

-

pwm.setclock()

+

- pwm.stop()

+

+

pwm.stop()

描述

-

设置pwm的频率

--Note: 设置pwm频率将会同步改变其他pwm输出的频率,当前版本的所有pwm仅支持同一频率输出。

+

暂停pwm输出波形。

语法

-

pwm.setclock(pin, clock)

+

pwm.stop(pin)

参数

-

pin: 0~11, IO编号

-clock: 1~500, pwm周期

+

pin: 0~11, IO编号

返回值

nil

示例

-
    pwm.setclock(0, 100)
-
+
    pwm.stop(0)
+
+

参见

+

- pwm.start()

+

+

pwm.setclock()

+

描述

+

设置pwm的频率

+-Note: 设置pwm频率将会同步改变其他pwm输出的频率,当前版本的所有pwm仅支持同一频率输出。

+

语法

+

pwm.setclock(pin, clock)

+

参数

+

pin: 0~11, IO编号

+clock: 1~500, pwm周期

+

返回值

+

nil

+

示例

+
    pwm.setclock(0, 100)
+
+ + +

参见

- pwm.getclock()

pwm.getclock()

-

描述

+

描述

获取pin的pwm工作频率

-

语法

+

语法

pwm.getclock(pin)

-

参数

+

参数

pin: 0~11, IO编号

-

返回值

+

返回值

number:pin的pwm工作频率

-

示例

-
    print(pwm.getclock(0))
-
+

示例

+
    print(pwm.getclock(0))
+
-

参见

+ +

参见

- pwm.setclock()

pwm.setduty()

-

描述

+

描述

设置pin的占空比。

-

语法

+

语法

pwm.setduty(pin, duty)

-

参数

+

参数

pin: 0~11, IO编号

duty: 0~100, pwm的占空比,以百分数表示

-

返回值

-

nil

-

示例

-
    pwm.setduty(0, 50)
-
- -

参见

-

- pwm.getduty()

-

-

pwm.getduty()

-

描述

-

获取pin的pwm占空比。

-

语法

-

pwm.getduty(pin)

-

参数

-

pin: 0~11, IO编号

返回值

nil

示例

-
    -- D0 连接绿色led
-    -- D1 连接蓝色led
-    -- D2 连接红色led
-    pwm.setup(0,500,50)
-    pwm.setup(1,500,50)
-    pwm.setup(2,500,50)
-    pwm.start(0)
-    pwm.start(1)
-    pwm.start(2)
-    function led(r,g,b)
-      pwm.setduty(0,g)
-      pwm.setduty(1,b)
-      pwm.setduty(2,r)
-    end
-    led(50,0,0) --  led显示红色
-    led(0,0,50) -- led显示蓝色
+
    pwm.setduty(0, 50)
+
-

参见

+

- pwm.getduty()

+

+

pwm.getduty()

+

描述

+

获取pin的pwm占空比。

+

语法

+

pwm.getduty(pin)

+

参数

+

pin: 0~11, IO编号

+

返回值

+

nil

+

示例

+
    -- D0 连接绿色led
+    -- D1 连接蓝色led
+    -- D2 连接红色led
+    pwm.setup(0,500,50)
+    pwm.setup(1,500,50)
+    pwm.setup(2,500,50)
+    pwm.start(0)
+    pwm.start(1)
+    pwm.start(2)
+    function led(r,g,b)
+      pwm.setduty(0,g)
+      pwm.setduty(1,b)
+      pwm.setduty(2,r)
+    end
+    led(50,0,0) --  led显示红色
+    led(0,0,50) -- led显示蓝色
+
+ + +

参见

- pwm.setduty()

net 模块

-

常量

+

常量

net.TCP, net.UDP

net.createServer()

-

描述

-

创建一个server。

-

语法

-

net.createServer(type, secure)

-

参数

-

type: 取值为:net.TCP 或者 net.UDP

-secure: 设置为true或者false, true代表安全连接,false代表普通连接。

-

返回值

-

net.server子模块

-

示例

-
    net.createServer(net.TCP, true)
-
- -

参见

-

- net.createConnection()

-

-

net.createConnection()

描述

-

创建一个client。

+

创建一个server。

语法

-

net.createConnection(type, secure)

+

net.createServer(type, timeout)

参数

type: 取值为:net.TCP 或者 net.UDP

-secure: 设置为true或者false, true代表安全连接,false代表普通连接。

+timeout: 1~28800, 当为tcp服务器时,客户端的超时时间设置。

返回值

net.server子模块

示例

-
    net.createConnection(net.UDP, false)
-
+
    net.createServer(net.TCP, 30)
+
+

参见

+

- net.createConnection()

+

+

net.createConnection()

+

描述

+

创建一个client。

+

语法

+

net.createConnection(type, secure)

+

参数

+

type: 取值为:net.TCP 或者 net.UDP

+secure: 设置为1或者0, 1代表安全连接,0代表普通连接。

+

返回值

+

net.server子模块

+

示例

+
    net.createConnection(net.UDP, 0)
+
+ + +

参见

- net.createServer()

net.server 子模块

listen()

-

描述

+

描述

侦听指定ip地址的端口。

-

语法

+

语法

net.server.listen(port,[ip],function(net.socket))

-

参数

+

参数

port: 端口号

ip:ip地址字符串,可以省略

function(net.socket): 连接创建成功的回调函数,可以作为参数传给调用函数。

-

返回值

-

nil

-

示例

-
    -- 创建一个server
-    sv=net.createServer(net.TCP, false)
-    -- server侦听端口80,如果收到数据将数据打印至控制台,并向远端发送‘hello world’
-    sv:listen(80,function(c)
-      c:on("receive", function(sck, pl) print(pl) end)
-      c:send("hello world")
-      end)
-
- -

参见

-

- net.createServer()

-

-

close()

-

描述

-

关闭server

-

语法

-

net.server.close()

-

参数

-

nil

返回值

nil

示例

-
    -- 创建server
-    sv=net.createServer(net.TCP, false)
-    -- 关闭server
-    sv:close()
-
+
    -- 创建一个server
+    sv=net.createServer(net.TCP, 30)  -- 30s 超时
+    -- server侦听端口80,如果收到数据将数据打印至控制台,并向远端发送‘hello world’
+    sv:listen(80,function(c)
+      c:on("receive", function(sck, pl) print(pl) end)
+      c:send("hello world")
+      end)
+
+

参见

- net.createServer()

+

+

close()

+

描述

+

关闭server

+

语法

+

net.server.close()

+

参数

+

nil

+

返回值

+

nil

+

示例

+
    -- 创建server
+    sv=net.createServer(net.TCP, 5)
+    -- 关闭server
+    sv:close()
+
+ + +

参见

+

- net.createServer()

net.socket 子模块

connect()

-

描述

+

描述

连接至远端。

-

语法

+

语法

connect(port, ip)

-

参数

+

参数

port: 端口号

ip: ip地址字符串

-

返回值

+

返回值

nil

-

参见

+

参见

- net.socket:on()

send()

-

描述

+

描述

通过连接向远端发送数据。

-

语法

+

语法

send(string, function(sent))

-

参数

+

参数

string: 待发送的字符串

function(sent): 发送字符串后的回调函数。

-

返回值

+

返回值

nil

-

参见

+

参见

- net.socket:on()

on()

-

描述

+

描述

向事件注册回调函数。

-

语法

+

语法

on(event, function cb())

-

参数

+

参数

event: 字符串,取值为: “connection”, “reconnection”, “disconnection”, “receive”, “sent”

function cb(net.socket, [string]): 回调函数。第一个参数是socket.

如果事件是”receive”, 第二个参数则为接收到的字符串。

-

返回值

+

返回值

nil

-

示例

-
    sk=net.createConnection(net.TCP, false)
-    sk:on("receive", function(sck, c) print(c) end )
-    sk:connect(80,"192.168.0.66")
-    sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n")
-
+

示例

+
    sk=net.createConnection(net.TCP, 0)
+    sk:on("receive", function(sck, c) print(c) end )
+    sk:connect(80,"192.168.0.66")
+    sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n")
+
-

参见

+ +

参见

- net.createServer()

close()

-

描述

+

描述

关闭socket。

-

语法

+

语法

close()

-

参数

+

参数

nil

-

返回值

+

返回值

nil

-

参见

+

参见

- net.createServer()

dns()

-

描述

+

描述

获取当前域的ip

-

语法

+

语法

dns(domain, function(net.socket, ip))

-

参数

+

参数

domain: 当前域的名称

function (net.socket, ip): 回调函数。第一个参数是socket,第二个参数是当前域的ip字符串。

-

返回值

+

返回值

nil

-

参见

+

参见

- net.createServer()

i2c模块

-

常量

+

常量

i2c.SLOW, i2c.TRANSMITTER, i2c. RECEIVER. FAST(400k)模式目前不支持。

i2c.setup()

-

描述

+

描述

初始化i2c。

-

语法

+

语法

i2c.setup(id, pinSDA, pinSCL, speed)

-

参数

+

参数

id = 0

pinSDA: 0~11, IO编号

pinSCL: 0~11, IO编号

speed: i2c.SLOW

-

返回值

+

返回值

nil

-

参见

+

参见

- i2c.read()

i2c.start()

-

描述

+

描述

启动i2c传输。

-

语法

+

语法

i2c.start(id)

-

参数

+

参数

id = 0

-

返回值

+

返回值

nil

-

参见

+

参见

- i2c.read()

i2c.stop()

-

描述

+

描述

停止i2c传输。

-

语法

+

语法

i2c.stop(id)

-

参数

+

参数

id = 0

-

返回值

+

返回值

nil

-

参见

+

参见

- i2c.read()

i2c.address()

-

描述

+

描述

设置i2c地址以及读写模式。

-

语法

+

语法

i2c.address(id, device_addr, direction)

-

参数

+

参数

id=0

device_addr: 设备地址。

direction: i2c.TRANSMITTER:写模式;i2c. RECEIVER:读模式。

-

返回值

+

返回值

nil

-

参见

+

参见

- i2c.read()

i2c.write()

-

描述

+

描述

向i2c写数据。数据可以是多个数字, 字符串或者lua table。

-

语法

+

语法

i2c.write(id, data1, data2,…)

-

参数

+

参数

id=0

data: 数据可以是多个数字, 字符串或者lua table。

-

返回值

+

返回值

nil

-

示例

-
    i2c.write(0, "hello", "world")
-
+

示例

+
    i2c.write(0, "hello", "world")
+
-

参见

+ +

参见

- i2c.read()

i2c.read()

-

描述

+

描述

读取len个字节的数据。

-

语法

+

语法

i2c.read(id, len)

-

参数

+

参数

id=0

len: 数据长度。

-

返回值

+

返回值

string:接收到的数据。

-

示例

-
    id=0
-    sda=1
-    scl=0
+

示例

+
    id=0
+    sda=1
+    scl=0
 
-    -- 初始化i2c, 将pin1设置为sda, 将pin0设置为scl
-    i2c.setup(id,sda,scl,i2c.SLOW)
+    -- 初始化i2c, 将pin1设置为sda, 将pin0设置为scl
+    i2c.setup(id,sda,scl,i2c.SLOW)
 
-    -- 用户定义函数:读取地址dev_addr的寄存器reg_addr中的内容。
-    function read_reg(dev_addr, reg_addr)
-      i2c.start(id)
-      i2c.address(id, dev_addr ,i2c.TRANSMITTER)
-      i2c.write(id,reg_addr)
-      i2c.stop(id)
-      i2c.start(id)
-      i2c.address(id, dev_addr,i2c.RECEIVER)
-      c=i2c.read(id,1)
-      i2c.stop(id)
-      return c
-    end
+    -- 用户定义函数:读取地址dev_addr的寄存器reg_addr中的内容。
+    function read_reg(dev_addr, reg_addr)
+      i2c.start(id)
+      i2c.address(id, dev_addr ,i2c.TRANSMITTER)
+      i2c.write(id,reg_addr)
+      i2c.stop(id)
+      i2c.start(id)
+      i2c.address(id, dev_addr,i2c.RECEIVER)
+      c=i2c.read(id,1)
+      i2c.stop(id)
+      return c
+    end
 
-    -- 读取0x77的寄存器0xAA中的内容。
-    reg = read_reg(0x77, 0xAA)
-    pirnt(string.byte(reg))
+    -- 读取0x77的寄存器0xAA中的内容。
+    reg = read_reg(0x77, 0xAA)
+    pirnt(string.byte(reg))
+
-
-

参见

+

参见

- i2c.write()

adc 模块

-

常量

+

常量

adc.read()

-

描述

-

读取adc的值,esp8266只有一个10bit adc,id为0,最大值1024

-

语法

+

描述

+

读取adc的值,esp8266只有一个10bit adc,id为0,引脚为TOUT,最大值1024

+

语法

adc.read(id)

-

参数

+

参数

id = 0

-

返回值

+

返回值

adc 值 10bit,最大1024.

-

参见

+

参见

-

\ No newline at end of file diff --git a/nodemcu_api_cn.md b/nodemcu_api_cn.md index a184b53b..272a39fd 100644 --- a/nodemcu_api_cn.md +++ b/nodemcu_api_cn.md @@ -1,8 +1,14 @@ # **nodeMcu API说明** # [English Version](https://github.com/funshine/nodemcu-firmware/wiki/nodemcu_api_en) -###版本 0.9.2 build 2014-11-19 +###版本 0.9.2 build 2014-11-20 ###变更日志: +2014-11-20
+修正tmr.delay,支持2s以上的延时,但是长延时可能会引起beacon timer out,导致与AP之间重新连接。
+增加tmr.wdclr(),用来重置看门狗计数器,用在长循环中,以防芯片因看门狗重启。
+修正net模块UDP无法连接问题。
+createServer(net.TCP, timeout)函数增加连接超时参数设置。 + 2014-11-19
增加adc模块,adc.read(0)读取adc的值。
wifi模块增加wifi.sta.getap() 函数,用于获取ap列表。 @@ -1032,6 +1038,31 @@ nil ####参见 **-** [tmr.now()](#tm_now) + +## tmr.wdclr() +####描述 +清除看门狗计数器。
+ +####语法 +tmr.wdclr() + +####参数 +nil. + +####返回值 +nil + +####示例 + +```lua + for i=1,10000 do + print(i) + tmr.wdclr() -- 一个长时间的循环或者事务,需内部调用tmr.wdclr() 清楚看门狗计数器,防止重启。 + end +``` + +####参见 +**-** [tmr.delay()](#tm_delay) #GPIO 模块 ##常量 @@ -1382,11 +1413,11 @@ net.TCP, net.UDP 创建一个server。 ####语法 -net.createServer(type, secure) +net.createServer(type, timeout) ####参数 type: 取值为:net.TCP 或者 net.UDP
-secure: 设置为true或者false, true代表安全连接,false代表普通连接。 +timeout: 1~28800, 当为tcp服务器时,客户端的超时时间设置。 ####返回值 net.server子模块 @@ -1394,7 +1425,7 @@ net.server子模块 ####示例 ```lua - net.createServer(net.TCP, true) + net.createServer(net.TCP, 30) ``` ####参见 @@ -1411,7 +1442,7 @@ net.createConnection(type, secure) ####参数 type: 取值为:net.TCP 或者 net.UDP
-secure: 设置为true或者false, true代表安全连接,false代表普通连接。 +secure: 设置为1或者0, 1代表安全连接,0代表普通连接。 ####返回值 net.server子模块 @@ -1419,7 +1450,7 @@ net.server子模块 ####示例 ```lua - net.createConnection(net.UDP, false) + net.createConnection(net.UDP, 0) ``` ####参见 @@ -1447,7 +1478,7 @@ nil ```lua -- 创建一个server - sv=net.createServer(net.TCP, false) + sv=net.createServer(net.TCP, 30) -- 30s 超时 -- server侦听端口80,如果收到数据将数据打印至控制台,并向远端发送‘hello world’ sv:listen(80,function(c) c:on("receive", function(sck, pl) print(pl) end) @@ -1477,7 +1508,7 @@ nil ```lua -- 创建server - sv=net.createServer(net.TCP, false) + sv=net.createServer(net.TCP, 5) -- 关闭server sv:close() ``` @@ -1544,7 +1575,7 @@ nil ####示例 ```lua - sk=net.createConnection(net.TCP, false) + sk=net.createConnection(net.TCP, 0) sk:on("receive", function(sck, c) print(c) end ) sk:connect(80,"192.168.0.66") sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n") @@ -1750,7 +1781,7 @@ string:接收到的数据。 ## adc.read() ####描述 -读取adc的值,esp8266只有一个10bit adc,id为0,最大值1024 +读取adc的值,esp8266只有一个10bit adc,id为0,引脚为TOUT,最大值1024 ####语法 adc.read(id) diff --git a/nodemcu_api_en.html b/nodemcu_api_en.html index e5c9b0c7..2293d147 100644 --- a/nodemcu_api_en.html +++ b/nodemcu_api_en.html @@ -1014,11 +1014,81 @@ body .markdown-body page-break-after: avoid; } } -nodemcu_api_en

nodeMcu API Instruction

+nodemcu_api_en

nodeMcu API Instruction

中文版本

-

version 0.9.2 build 2014-11-19

+

version 0.9.2 build 2014-11-20

change log:

+

2014-11-20

+fix tmr.delay to support more than 2s delay, may cause bacon time out, lost connection to AP.

+add tmr.wdclr to clear watchdog counter in chip, use in long time loop.

+fix UDP part of net module.

+add a timeout para to createServer(net.TCP, timeout).

2014-11-19

add adc module, use adc.read(0) to read adc value, no tests made.

add wifi.sta.getap() api to wifi.sta module, to get ap list.

@@ -1100,8 +1170,9 @@ key is triged only when key is released

Returns

nil

Example

-
    node.restart();
-
+
    node.restart();
+
+

See also

-

@@ -1117,8 +1188,9 @@ key is triged only when key is released

Returns

nil

Example

-
    node.dsleep(us);
-
+
    node.dsleep(us);
+
+

See also

-

@@ -1133,8 +1205,9 @@ key is triged only when key is released

Returns

number:chip ID

Example

-
    id = node.chipid();
-
+
    id = node.chipid();
+
+

See also

-

@@ -1149,8 +1222,9 @@ key is triged only when key is released

Returns

number: system heap size left in bytes

Example

-
    heap_size = node.heap();
-
+
    heap_size = node.heap();
+
+

See also

-

@@ -1167,8 +1241,9 @@ Default function: long: change LED blinking rate, short: reset chip

Returns

nil

Example

-
    node.key("long", function(){print('hello world')})
-
+
    node.key("long", function(){print('hello world')})
+
+

See also

-

@@ -1184,9 +1259,10 @@ High: LED off time. Unit: milliseconds, time resolution: 80~100ms

Returns

nil

Example

-
    -- turn led on forever.
-    node.led(0);
-
+
    -- turn led on forever.
+    node.led(0);
+
+

See also

-

@@ -1202,9 +1278,10 @@ same as pcall(loadstring(str)) but support multi seperated line.

Returns

nil

Example

-
    -- never use node.input() in console. no effect.
-    sk:on("receive", function(conn, payload) node.input(payload) end)
-
+
    -- never use node.input() in console. no effect.
+    sk:on("receive", function(conn, payload) node.input(payload) end)
+
+

See also

-

@@ -1220,33 +1297,35 @@ serial_debug: 1 output also show in serial. 0: no serial output.

Returns

nil

Example

-
    function tonet(str)
-      sk:send(str)
-      -- print(str) WRONG!!! never ever print something in this function
-      -- because this will cause a recursive function call!!!
-    end
-    node.ouput(tonet, 1)  -- serial also get the lua output.
-
+
    function tonet(str)
+      sk:send(str)
+      -- print(str) WRONG!!! never ever print something in this function
+      -- because this will cause a recursive function call!!!
+    end
+    node.ouput(tonet, 1)  -- serial also get the lua output.
+
+ + +
    -- a simple telnet server
+    s=net.createServer(net.TCP) 
+    s:listen(2323,function(c) 
+       con_std = c 
+       function s_output(str) 
+          if(con_std~=nil) 
+             then con_std:send(str) 
+          end 
+       end 
+       node.output(s_output, 0)   -- re-direct output to function s_ouput.
+       c:on("receive",function(c,l) 
+          node.input(l)           -- works like pcall(loadstring(l)) but support multiple separate line
+       end) 
+       c:on("disconnection",function(c) 
+          con_std = nil 
+          node.output(nil)        -- un-regist the redirect output function, output goes to serial
+       end) 
+    end)
+
-
    -- a simple telnet server
-    s=net.createServer(net.TCP) 
-    s:listen(2323,function(c) 
-       con_std = c 
-       function s_output(str) 
-          if(con_std~=nil) 
-             then con_std:send(str) 
-          end 
-       end 
-       node.output(s_output, 0)   -- re-direct output to function s_ouput.
-       c:on("receive",function(c,l) 
-          node.input(l)           -- works like pcall(loadstring(l)) but support multiple separate line
-       end) 
-       c:on("disconnection",function(c) 
-          con_std = nil 
-          node.output(nil)        -- un-regist the redirect output function, output goes to serial
-       end) 
-    end)
-

See also

-

@@ -1262,9 +1341,10 @@ serial_debug: 1 output also show in serial. 0: no serial output.

Returns

nil

Example

-
    -- remove "foo.lua" from file system.
-    file.remove("foo.lua")
-
+
    -- remove "foo.lua" from file system.
+    file.remove("foo.lua")
+
+

See also

- file.open()

@@ -1287,11 +1367,12 @@ mode:

Returns

nil

Example

-
    -- open 'init.lua', print the first line.
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- open 'init.lua', print the first line.
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

See also

- file.close()

@@ -1307,11 +1388,12 @@ mode:

Returns

nil

Example

-
    -- open 'init.lua', print the first line.
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- open 'init.lua', print the first line.
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

See also

- file.open()

@@ -1328,11 +1410,12 @@ mode:

file content in string, line by line, include EOL(‘\n’)

return nil when EOF.

Example

-
    -- print the first line of 'init.lua'
-    file.open("init.lua", "r")
-    print(file.readline())
-    file.close()
-
+
    -- print the first line of 'init.lua'
+    file.open("init.lua", "r")
+    print(file.readline())
+    file.close()
+
+

See also

- file.open()

@@ -1349,12 +1432,13 @@ return nil when EOF.

true: write ok.
nil: there is error

Example

-
    -- open 'init.lua' in 'a+' mode
-    file.open("init.lua", "a+")
-    -- write 'foo bar' to the end of the file
-    file.writeline('foo bar')
-    file.close()
-
+
    -- open 'init.lua' in 'a+' mode
+    file.open("init.lua", "a+")
+    -- write 'foo bar' to the end of the file
+    file.writeline('foo bar')
+    file.close()
+
+

See also

- file.open()

@@ -1371,12 +1455,13 @@ nil: there is error

true: write ok.
nil: there is error

Example

-
    -- open 'init.lua' in 'a+' mode
-    file.open("init.lua", "a+")
-    -- write 'foo bar' to the end of the file
-    file.write('foo bar')
-    file.close()
-
+
    -- open 'init.lua' in 'a+' mode
+    file.open("init.lua", "a+")
+    -- write 'foo bar' to the end of the file
+    file.write('foo bar')
+    file.close()
+
+

See also

- file.open()

@@ -1392,13 +1477,14 @@ nil: there is error

Returns

nil

Example

-
    -- open 'init.lua' in 'a+' mode
-    file.open("init.lua", "a+")
-    -- write 'foo bar' to the end of the file
-    file.write('foo bar')
-    file.flush()
-    file.close()
-
+
    -- open 'init.lua' in 'a+' mode
+    file.open("init.lua", "a+")
+    -- write 'foo bar' to the end of the file
+    file.write('foo bar')
+    file.flush()
+    file.close()
+
+

See also

- file.open()

@@ -1419,15 +1505,16 @@ offset: default 0

success: returns the final file position

fail: returns nil

Example

-
    -- open 'init.lua' in 'a+' mode
-    file.open("init.lua", "a+")
-    -- write 'foo bar' to the end of the file
-    file.write('foo bar')
-    file.flush()
-    file.seek("set")
-    print(file.readline())
-    file.close()
-
+
    -- open 'init.lua' in 'a+' mode
+    file.open("init.lua", "a+")
+    -- write 'foo bar' to the end of the file
+    file.write('foo bar')
+    file.flush()
+    file.seek("set")
+    print(file.readline())
+    file.close()
+
+

See also

- file.open()

@@ -1443,11 +1530,12 @@ fail: returns nil

Returns

a lua table which contains the {file name: file size} pairs

Example

-
    l = file.list();
-    for k,v in l do
-      print("name:"..k..", size:"..v)
-    end
-
+
    l = file.list();
+    for k,v in l do
+      print("name:"..k..", size:"..v)
+    end
+
+

See also

- file.remove()

@@ -1465,8 +1553,9 @@ fail: returns nil

Returns

current mode after setup

Example

-
    wifi.setmode(wifi.STATION)
-
+
    wifi.setmode(wifi.STATION)
+
+

See also

- wifi.getmode()

@@ -1481,8 +1570,9 @@ fail: returns nil

Returns

wifi operation mode

Example

-
    print(wifi.getmode())
-
+
    print(wifi.getmode())
+
+

See also

- wifi.setmode()

@@ -1498,8 +1588,9 @@ succeed_callback: callback function called after configuration, which is called

Returns

nil

Example

-
    wifi.startsmart(6, cb())
-
+
    wifi.startsmart(6, cb())
+
+

See also

- wifi.stopsmart()

@@ -1514,8 +1605,9 @@ succeed_callback: callback function called after configuration, which is called

Returns

nil

Example

-
    wifi.stopsmart()
-
+
    wifi.stopsmart()
+
+

See also

- wifi.startsmart()

@@ -1532,8 +1624,9 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    wifi.sta.config("myssid","mypassword")
-
+
    wifi.sta.config("myssid","mypassword")
+
+

See also

- wifi.sta.connect()

@@ -1549,8 +1642,9 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    wifi.sta.connect()
-
+
    wifi.sta.connect()
+
+

See also

- wifi.sta.disconnect()

@@ -1566,8 +1660,9 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    wifi.sta.disconnect()
-
+
    wifi.sta.disconnect()
+
+

See also

- wifi.sta.config()

@@ -1583,8 +1678,9 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    wifi.sta.autoconnect()
-
+
    wifi.sta.autoconnect()
+
+

See also

- wifi.sta.config()

@@ -1601,9 +1697,10 @@ password: string which is less than 64 bytes.

Returns

ip address in string, for example:”192.168.0.111”

Example

-
    -- print current ip
-    print(wifi.sta.getip())
-
+
    -- print current ip
+    print(wifi.sta.getip())
+
+

See also

- wifi.sta.getmac()

@@ -1618,9 +1715,10 @@ password: string which is less than 64 bytes.

Returns

mac address in string, for example:”18-33-44-FE-55-BB”

Example

-
    -- print current mac address
-    print(wifi.sta.getmac())
-
+
    -- print current mac address
+    print(wifi.sta.getmac())
+
+

See also

- wifi.sta.getip()

@@ -1636,14 +1734,15 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    -- print ap list
-    function listap(t)
-      for k,v in pairs(t) do
-        print(k.." : "..v)
-      end
-    end
-    wifi.sta.getap(listap)
-
+
    -- print ap list
+    function listap(t)
+      for k,v in pairs(t) do
+        print(k.." : "..v)
+      end
+    end
+    wifi.sta.getap(listap)
+
+

See also

- wifi.sta.getip()

@@ -1657,17 +1756,19 @@ password: string which is less than 64 bytes.

Parameters

cfg: lua table to setup ap.

Example:

-
     cfg={}
-     cfg.ssid="myssid"
-     cfg.pwd="mypwd"
-     wifi.ap.setconfig(cfg)
-
+
     cfg={}
+     cfg.ssid="myssid"
+     cfg.pwd="mypwd"
+     wifi.ap.setconfig(cfg)
+
+

Returns

nil

Example

-
    wifi.ap.config(ssid, 'password')
-
+
    wifi.ap.config(ssid, 'password')
+
+

See also

-

@@ -1682,8 +1783,9 @@ password: string which is less than 64 bytes.

Returns

ip address in string, for example:”192.168.0.111”

Example

-
    wifi.ap.getip()
-
+
    wifi.ap.getip()
+
+

See also

- wifi.ap.getmac()

@@ -1698,8 +1800,9 @@ password: string which is less than 64 bytes.

Returns

mac address in string, for example:”1A-33-44-FE-55-BB”

Example

-
    wifi.ap.getmac()
-
+
    wifi.ap.getmac()
+
+

See also

- wifi.ap.getip()

@@ -1715,9 +1818,10 @@ password: string which is less than 64 bytes.

Returns

nil

Example

-
    -- delay 100us
-    tmr.delay(100)
-
+
    -- delay 100us
+    tmr.delay(100)
+
+

See also

- tmr.now()

@@ -1732,9 +1836,10 @@ password: string which is less than 64 bytes.

Returns

uint32: value of counter

Example

-
    -- print current value of counter
-    print(tmr.now())
-
+
    -- print current value of counter
+    print(tmr.now())
+
+

See also

- tmr.delay()

@@ -1751,9 +1856,10 @@ function do(): callback function for alarm timed out

Returns

nil

Example

-
    -- print "hello world" every 1000ms
-    tmr.alarm(1000, 1, function() print("hello world") end )
-
+
    -- print "hello world" every 1000ms
+    tmr.alarm(1000, 1, function() print("hello world") end )
+
+

See also

- tmr.now()

@@ -1769,537 +1875,573 @@ function do(): callback function for alarm timed out

Returns

nil

Example

-
    -- print "hello world" every 1000ms
-    tmr.alarm(1000, 1, function() print("hello world") end )
+
    -- print "hello world" every 1000ms
+    tmr.alarm(1000, 1, function() print("hello world") end )
 
-    -- something else
+    -- something else
+
+    -- stop alarm
+    tmr.stop()
+
- -- stop alarm - tmr.stop() -

See also

- tmr.now()

+

+

tmr.wdclr()

+

Description

+

clear system watchdog counter.

+

Syntax

+

tmr.wdclr()

+

Parameters

+

nil.

+

Returns

+

nil

+

Example

+
    for i=1,10000 do 
+      print(i)
+      tmr.wdclr()   -- should call tmr.wdclr() in a long loop to avoid hardware reset caused by watchdog.
+    end 
+
+ + +

See also

+

- tmr.delay()

GPIO module

CONSTANT

gpio.OUTPUT, gpio.INPUT, gpio.INT, gpio.HIGH, gpio.LOW

gpio.mode()

-

Description

+

Description

initialize pin to GPIO mode, set the pin in/out mode.

-

Syntax

+

Syntax

gpio.mode(pin, mode)

-

Parameters

+

Parameters

pin: 0~11, IO index

mode: gpio.OUTPUT or gpio.INPUT, or gpio.INT(interrupt mode)

-

Returns

+

Returns

nil

-

Example

-
    -- set gpio 0 as output.
-    gpio.mode(0, gpio.OUTPUT)
+

Example

+
    -- set gpio 0 as output.
+    gpio.mode(0, gpio.OUTPUT)
+
-
-

See also

+

See also

- gpio.read()

gpio.read()

-

Description

+

Description

read pin value.

-

Syntax

+

Syntax

gpio.read(pin)

-

Parameters

+

Parameters

pin: 0~11, IO index

-

Returns

+

Returns

number:0 - low, 1 - high

-

Example

-
    -- read value of gpio 0.
-    gpio.read(0)
-
+

Example

+
    -- read value of gpio 0.
+    gpio.read(0)
+
-

See also

+ +

See also

- gpio.mode()

gpio.write()

-

Description

+

Description

set pin value.

-

Syntax

+

Syntax

gpio.write(pin)

-

Parameters

+

Parameters

pin: 0~11, IO index

level: gpio.HIGH or gpio.LOW

-

Returns

+

Returns

nil

-

Example

-
    -- set pin index 1 to GPIO mode, and set the pin to high.
-    pin=1
-    gpio.mode(pin, gpio.OUTPUT)
-    gpio.write(pin, gpio.HIGH)
-
+

Example

+
    -- set pin index 1 to GPIO mode, and set the pin to high.
+    pin=1
+    gpio.mode(pin, gpio.OUTPUT)
+    gpio.write(pin, gpio.HIGH)
+
-

See also

+ +

See also

- gpio.mode()

- gpio.read()

gpio.trig()

-

Description

+

Description

set the interrupt callback function for pin.

-

Syntax

+

Syntax

gpio.trig(pin, type, function(level))

-

Parameters

+

Parameters

pin: 0~11, IO index

type: “up”, “down”, “both”, “low”, “high”, which represent rising edge, falling edge, both edge, low level, high level trig mode separately.

function(level): callback function when triggered. The gpio level is the param. Use previous callback function if undefined here.

-

Returns

+

Returns

nil

-

Example

-
    -- use pin 0 as the input pulse width counter
-    pulse0 = 0
-    du = 0
-    gpio.mode(0,gpio.INT)
-    function pin0cb(level)
-     du = tmr.now() – pulse0
-     print(du)
-     pulse0 = tmr.now()
-     if level == 1 then gpio.trig(0, "down ") else gpio.trig(0, "up ") end
-    end
-    gpio.trig(0, "down ",pin0cb)
+

Example

+
    -- use pin 0 as the input pulse width counter
+    pulse0 = 0
+    du = 0
+    gpio.mode(0,gpio.INT)
+    function pin0cb(level)
+     du = tmr.now()  pulse0
+     print(du)
+     pulse0 = tmr.now()
+     if level == 1 then gpio.trig(0, "down ") else gpio.trig(0, "up ") end
+    end
+    gpio.trig(0, "down ",pin0cb)
+
-
-

See also

+

See also

- gpio.mode()

- gpio.write()

PWM module

pwm.setup()

-

Description

+

Description

set pin to PWM mode. Only 3 pins can be set to PWM mode at the most.

-

Syntax

+

Syntax

pwm.setup(pin, clock, duty)

-

Parameters

+

Parameters

pin: 0~11, IO index

clock: 1~500, pwm frequency

duty: 0~100, pwm duty cycle in percentage

-

Returns

-

nil

-

Example

-
    -- set pin index 0 as pwm output, frequency is 100Hz, duty cycle is 50-50.
-    pwm.setup(0, 100, 50)
-
- -

See also

-

- pwm.start()

-

-

pwm.close()

-

Description

-

quit PWM mode for specified pin.

-

Syntax

-

pwm.close(pin)

-

Parameters

-

pin: 0~11, IO index

Returns

nil

Example

-
    pwm.close(0)
-
+
    -- set pin index 0 as pwm output, frequency is 100Hz, duty cycle is 50-50.
+    pwm.setup(0, 100, 50)
+
+

See also

- pwm.start()

-

-

pwm.start()

+

+

pwm.close()

Description

-

pwm starts, you can detect the waveform on the gpio.

+

quit PWM mode for specified pin.

Syntax

-

pwm.start(pin)

+

pwm.close(pin)

Parameters

pin: 0~11, IO index

Returns

nil

Example

-
    pwm.start(0)
-
+
    pwm.close(0)
+
+

See also

-

- pwm.stop()

-

-

pwm.stop()

+

- pwm.start()

+

+

pwm.start()

Description

-

pause the output of PWM waveform.

+

pwm starts, you can detect the waveform on the gpio.

Syntax

-

pwm.stop(pin)

+

pwm.start(pin)

Parameters

pin: 0~11, IO index

Returns

nil

Example

-
    pwm.stop(0)
-
+
    pwm.start(0)
+
+

See also

-

- pwm.start()

-

-

pwm.setclock()

+

- pwm.stop()

+

+

pwm.stop()

Description

-

set pwm frequency for pin.

--Note: setup pwm frequency will synchronously change others if there are any. Only one PWM frequency can be allowed for the system.

+

pause the output of PWM waveform.

Syntax

-

pwm.setclock(pin, clock)

+

pwm.stop(pin)

Parameters

-

pin: 0~11, IO index.

-clock: 1~500, pwm frequency.

+

pin: 0~11, IO index

Returns

nil

Example

-
    pwm.setclock(0, 100)
-
+
    pwm.stop(0)
+
+

See also

+

- pwm.start()

+

+

pwm.setclock()

+

Description

+

set pwm frequency for pin.

+-Note: setup pwm frequency will synchronously change others if there are any. Only one PWM frequency can be allowed for the system.

+

Syntax

+

pwm.setclock(pin, clock)

+

Parameters

+

pin: 0~11, IO index.

+clock: 1~500, pwm frequency.

+

Returns

+

nil

+

Example

+
    pwm.setclock(0, 100)
+
+ + +

See also

- pwm.getclock()

pwm.getclock()

-

Description

+

Description

get pwm frequency of pin.

-

Syntax

+

Syntax

pwm.getclock(pin)

-

Parameters

+

Parameters

pin: 0~11, IO index.

-

Returns

+

Returns

number:pwm frequency of pin

-

Example

-
    print(pwm.getclock(0))
-
+

Example

+
    print(pwm.getclock(0))
+
-

See also

+ +

See also

- pwm.setclock()

pwm.setduty()

-

Description

+

Description

set duty clycle for pin.

-

Syntax

+

Syntax

pwm.setduty(pin, duty)

-

Parameters

+

Parameters

pin: 0~11, IO index

duty: 0~100, pwm duty cycle in percentage

-

Returns

-

nil

-

Example

-
    pwm.setduty(0, 50)
-
- -

See also

-

- pwm.getduty()

-

-

pwm.getduty()

-

Description

-

get duty clycle for pin.

-

Syntax

-

pwm.getduty(pin)

-

Parameters

-

pin: 0~11, IO index

Returns

nil

Example

-
    -- D0 is connected to green led
-    -- D1 is connected to blue led
-    -- D2 is connected to red led
-    pwm.setup(0,500,50)
-    pwm.setup(1,500,50)
-    pwm.setup(2,500,50)
-    pwm.start(0)
-    pwm.start(1)
-    pwm.start(2)
-    function led(r,g,b)
-      pwm.setduty(0,g)
-      pwm.setduty(1,b)
-      pwm.setduty(2,r)
-    end
-    led(50,0,0) --  set led to red
-    led(0,0,50) -- set led to blue.
+
    pwm.setduty(0, 50)
+
-

See also

+

- pwm.getduty()

+

+

pwm.getduty()

+

Description

+

get duty clycle for pin.

+

Syntax

+

pwm.getduty(pin)

+

Parameters

+

pin: 0~11, IO index

+

Returns

+

nil

+

Example

+
    -- D0 is connected to green led
+    -- D1 is connected to blue led
+    -- D2 is connected to red led
+    pwm.setup(0,500,50)
+    pwm.setup(1,500,50)
+    pwm.setup(2,500,50)
+    pwm.start(0)
+    pwm.start(1)
+    pwm.start(2)
+    function led(r,g,b)
+      pwm.setduty(0,g)
+      pwm.setduty(1,b)
+      pwm.setduty(2,r)
+    end
+    led(50,0,0) --  set led to red
+    led(0,0,50) -- set led to blue.
+
+ + +

See also

- pwm.setduty()

net module

CONSTANT

net.TCP, net.UDP

net.createServer()

-

Description

-

create a server.

-

Syntax

-

net.createServer(type, secure)

-

Parameters

-

type: net.TCP or net.UDP

-secure: true or false, true for safe link, false for ordinary link

-

Returns

-

net.server sub module

-

Example

-
    net.createServer(net.TCP, true)
-
- -

See also

-

- net.createConnection()

-

-

net.createConnection()

Description

-

create a client.

+

create a server.

Syntax

-

net.createConnection(type, secure)

+

net.createServer(type, timeout)

Parameters

type: net.TCP or net.UDP

-secure: true or false, true for safe link, false for ordinary link

+timeout: for a TCP server, timeout is 1~28800 seconds, for a inactive client to disconnected.

Returns

net.server sub module

Example

-
    net.createConnection(net.UDP, false)
-
+
    net.createServer(net.TCP, 30) -- 30s timeout
+
+

See also

+

- net.createConnection()

+

+

net.createConnection()

+

Description

+

create a client.

+

Syntax

+

net.createConnection(type, secure)

+

Parameters

+

type: net.TCP or net.UDP

+secure: 1 or 0, 1 for ssl link, 0 for normal link

+

Returns

+

net.server sub module

+

Example

+
    net.createConnection(net.UDP, 0)
+
+ + +

See also

- net.createServer()

net.server module

listen()

-

Description

+

Description

listen on port from [ip] address.

-

Syntax

+

Syntax

net.server.listen(port,[ip],function(net.socket))

-

Parameters

+

Parameters

port: port number

ip:ip address string, can be omitted

function(net.socket): callback function, pass to Caller function as param if a connection is created successfully

-

Returns

-

nil

-

Example

-
    -- create a server
-    sv=net.createServer(net.TCP, false)
-    -- server listen on 80, if data received, print data to console, and send "hello world" to remote.
-    sv:listen(80,function(c)
-      c:on("receive", function(sck, pl) print(pl) end)
-      c:send("hello world")
-      end)
-
- -

See also

-

- net.createServer()

-

-

close()

-

Description

-

close server.

-

Syntax

-

net.server.close()

-

Parameters

-

nil

Returns

nil

Example

-
    -- create a server
-    sv=net.createServer(net.TCP, false)
-    -- close server
-    sv:close()
-
+
    -- create a server
+    sv=net.createServer(net.TCP, 30)    -- 30s time out for a inactive client
+    -- server listen on 80, if data received, print data to console, and send "hello world" to remote.
+    sv:listen(80,function(c)
+      c:on("receive", function(sck, pl) print(pl) end)
+      c:send("hello world")
+      end)
+
+

See also

- net.createServer()

+

+

close()

+

Description

+

close server.

+

Syntax

+

net.server.close()

+

Parameters

+

nil

+

Returns

+

nil

+

Example

+
    -- create a server
+    sv=net.createServer(net.TCP, 30)
+    -- close server
+    sv:close()
+
+ + +

See also

+

- net.createServer()

net.socket module

connect()

-

Description

+

Description

connect to remote.

-

Syntax

+

Syntax

connect(port, ip)

-

Parameters

+

Parameters

port: port number

ip: ip address in string

-

Returns

-

nil

-

See also

-

- net.socket:on()

-

-

send()

-

Description

-

send data to remote via connection.

-

Syntax

-

send(string, function(sent))

-

Parameters

-

string: data in string which will be sent to remote

-function(sent): callback function for sending string

Returns

nil

See also

- net.socket:on()

+

+

send()

+

Description

+

send data to remote via connection.

+

Syntax

+

send(string, function(sent))

+

Parameters

+

string: data in string which will be sent to remote

+function(sent): callback function for sending string

+

Returns

+

nil

+

See also

+

- net.socket:on()

on()

-

Description

+

Description

register callback function for event.

-

Syntax

+

Syntax

on(event, function cb())

-

Parameters

+

Parameters

event: string, which can be: “connection”, “reconnection”, “disconnection”, “receive”, “sent”

function cb(net.socket, [string]): callback function. The first param is the socket.

If event is”receive”, the second param is received data in string.

-

Returns

+

Returns

nil

-

Example

-
    sk=net.createConnection(net.TCP, false)
-    sk:on("receive", function(sck, c) print(c) end )
-    sk:connect(80,"192.168.0.66")
-    sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n")
-
+

Example

+
    sk=net.createConnection(net.TCP, 0)
+    sk:on("receive", function(sck, c) print(c) end )
+    sk:connect(80,"192.168.0.66")
+    sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n")
+
-

See also

+ +

See also

- net.createServer()

close()

-

Description

-

close socket.

-

Syntax

-

close()

-

Parameters

-

nil

-

Returns

-

nil

-

See also

-

- net.createServer()

-

-

dns()

Description

-

get domain ip

+

close socket.

Syntax

-

dns(domain, function(net.socket, ip))

+

close()

Parameters

-

domain: domain name.

-function (net.socket, ip): callback function. The first param is the socket, the second param is the ip address in string.

+

nil

Returns

nil

See also

- net.createServer()

+

+

dns()

+

Description

+

get domain ip

+

Syntax

+

dns(domain, function(net.socket, ip))

+

Parameters

+

domain: domain name.

+function (net.socket, ip): callback function. The first param is the socket, the second param is the ip address in string.

+

Returns

+

nil

+

See also

+

- net.createServer()

i2c module

CONSTANT

i2c.SLOW, i2c.TRANSMITTER, i2c. RECEIVER. FAST(400k)is not supported for now.

i2c.setup()

-

Description

+

Description

initialize i2c.

-

Syntax

+

Syntax

i2c.setup(id, pinSDA, pinSCL, speed)

-

Parameters

+

Parameters

id = 0

pinSDA: 0~11, IO index

pinSCL: 0~11, IO index

speed: i2c.SLOW

-

Returns

-

nil

-

See also

-

- i2c.read()

-

-

i2c.start()

-

Description

-

start i2c transporting.

-

Syntax

-

i2c.start(id)

-

Parameters

-

id = 0

Returns

nil

See also

- i2c.read()

-

-

i2c.stop()

+

+

i2c.start()

Description

-

stop i2c transporting.

+

start i2c transporting.

Syntax

-

i2c.stop(id)

+

i2c.start(id)

Parameters

id = 0

Returns

nil

See also

- i2c.read()

-

-

i2c.address()

+

+

i2c.stop()

Description

-

setup i2c address and read/write mode.

+

stop i2c transporting.

Syntax

-

i2c.address(id, device_addr, direction)

+

i2c.stop(id)

Parameters

-

id=0

-device_addr: device address.

-direction: i2c.TRANSMITTER for writing mode , i2c. RECEIVER for reading mode

+

id = 0

Returns

nil

See also

- i2c.read()

-

-

i2c.write()

+

+

i2c.address()

Description

-

write data to i2c, data can be multi numbers, string or lua table.

+

setup i2c address and read/write mode.

Syntax

-

i2c.write(id, data1, data2,…)

+

i2c.address(id, device_addr, direction)

Parameters

id=0

-data: data can be numbers, string or lua table.

+device_addr: device address.

+direction: i2c.TRANSMITTER for writing mode , i2c. RECEIVER for reading mode

Returns

nil

-

Example

-
    i2c.write(0, "hello", "world")
-
-

See also

- i2c.read()

+

+

i2c.write()

+

Description

+

write data to i2c, data can be multi numbers, string or lua table.

+

Syntax

+

i2c.write(id, data1, data2,…)

+

Parameters

+

id=0

+data: data can be numbers, string or lua table.

+

Returns

+

nil

+

Example

+
    i2c.write(0, "hello", "world")
+
+ + +

See also

+

- i2c.read()

i2c.read()

-

Description

+

Description

read data for len bytes.

-

Syntax

+

Syntax

i2c.read(id, len)

-

Parameters

+

Parameters

id=0

len: data length

-

Returns

+

Returns

string:data received.

-

Example

-
    id=0
-    sda=1
-    scl=0
+

Example

+
    id=0
+    sda=1
+    scl=0
 
-    -- initialize i2c, set pin1 as sda, set pin0 as scl
-    i2c.setup(id,sda,scl,i2c.SLOW)
+    -- initialize i2c, set pin1 as sda, set pin0 as scl
+    i2c.setup(id,sda,scl,i2c.SLOW)
 
-    -- user defined function: read from reg_addr content of dev_addr
-    function read_reg(dev_addr, reg_addr)
-      i2c.start(id)
-      i2c.address(id, dev_addr ,i2c.TRANSMITTER)
-      i2c.write(id,reg_addr)
-      i2c.stop(id)
-      i2c.start(id)
-      i2c.address(id, dev_addr,i2c.RECEIVER)
-      c=i2c.read(id,1)
-      i2c.stop(id)
-      return c
-    end
+    -- user defined function: read from reg_addr content of dev_addr
+    function read_reg(dev_addr, reg_addr)
+      i2c.start(id)
+      i2c.address(id, dev_addr ,i2c.TRANSMITTER)
+      i2c.write(id,reg_addr)
+      i2c.stop(id)
+      i2c.start(id)
+      i2c.address(id, dev_addr,i2c.RECEIVER)
+      c=i2c.read(id,1)
+      i2c.stop(id)
+      return c
+    end
 
-    -- get content of register 0xAA of device 0x77
-    reg = read_reg(0x77, 0xAA)
-    pirnt(string.byte(reg))
+    -- get content of register 0xAA of device 0x77
+    reg = read_reg(0x77, 0xAA)
+    pirnt(string.byte(reg))
+
-
-

See also

+

See also

- i2c.write()

adc module

CONSTANT

none

adc.read()

-

Description

-

read adc value of id, esp8266 has only one 10bit adc, id=0

-

Syntax

+

Description

+

read adc value of id, esp8266 has only one 10bit adc, id=0, pin TOUT

+

Syntax

adc.read(id)

-

Parameters

+

Parameters

id = 0

-

Returns

+

Returns

adc value

-

See also

+

See also

-

\ No newline at end of file diff --git a/nodemcu_api_en.md b/nodemcu_api_en.md index 37fb253b..7837e675 100644 --- a/nodemcu_api_en.md +++ b/nodemcu_api_en.md @@ -1,8 +1,14 @@ # **nodeMcu API Instruction** # [中文版本](https://github.com/funshine/nodemcu-firmware/wiki/nodemcu_api_cn) -###version 0.9.2 build 2014-11-19 +###version 0.9.2 build 2014-11-20 ###change log: +2014-11-20
+fix tmr.delay to support more than 2s delay, may cause bacon time out, lost connection to AP.
+add tmr.wdclr to clear watchdog counter in chip, use in long time loop.
+fix UDP part of net module.
+add a timeout para to createServer(net.TCP, timeout). + 2014-11-19
add adc module, use adc.read(0) to read adc value, no tests made.
add wifi.sta.getap() api to wifi.sta module, to get ap list. @@ -1051,6 +1057,32 @@ nil **-** [tmr.now()](#tm_now) + +## tmr.wdclr() +####Description +clear system watchdog counter.
+ +####Syntax +tmr.wdclr() + +####Parameters +nil. + +####Returns +nil + +####Example + +```lua + for i=1,10000 do + print(i) + tmr.wdclr() -- should call tmr.wdclr() in a long loop to avoid hardware reset caused by watchdog. + end +``` + +####See also +**-** [tmr.delay()](#tm_delay) + #GPIO module ##CONSTANT gpio.OUTPUT, gpio.INPUT, gpio.INT, gpio.HIGH, gpio.LOW @@ -1401,11 +1433,11 @@ net.TCP, net.UDP create a server. ####Syntax -net.createServer(type, secure) +net.createServer(type, timeout) ####Parameters type: net.TCP or net.UDP
-secure: true or false, true for safe link, false for ordinary link +timeout: for a TCP server, timeout is 1~28800 seconds, for a inactive client to disconnected. ####Returns net.server sub module @@ -1413,7 +1445,7 @@ net.server sub module ####Example ```lua - net.createServer(net.TCP, true) + net.createServer(net.TCP, 30) -- 30s timeout ``` ####See also @@ -1430,7 +1462,7 @@ net.createConnection(type, secure) ####Parameters type: net.TCP or net.UDP
-secure: true or false, true for safe link, false for ordinary link +secure: 1 or 0, 1 for ssl link, 0 for normal link ####Returns net.server sub module @@ -1438,7 +1470,7 @@ net.server sub module ####Example ```lua - net.createConnection(net.UDP, false) + net.createConnection(net.UDP, 0) ``` ####See also @@ -1466,7 +1498,7 @@ nil ```lua -- create a server - sv=net.createServer(net.TCP, false) + sv=net.createServer(net.TCP, 30) -- 30s time out for a inactive client -- server listen on 80, if data received, print data to console, and send "hello world" to remote. sv:listen(80,function(c) c:on("receive", function(sck, pl) print(pl) end) @@ -1496,7 +1528,7 @@ nil ```lua -- create a server - sv=net.createServer(net.TCP, false) + sv=net.createServer(net.TCP, 30) -- close server sv:close() ``` @@ -1563,7 +1595,7 @@ nil ####Example ```lua - sk=net.createConnection(net.TCP, false) + sk=net.createConnection(net.TCP, 0) sk:on("receive", function(sck, c) print(c) end ) sk:connect(80,"192.168.0.66") sk:send("GET / HTTP/1.1\r\nHost: 192.168.0.66\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n") @@ -1769,7 +1801,7 @@ none ## adc.read() ####Description -read adc value of id, esp8266 has only one 10bit adc, id=0 +read adc value of id, esp8266 has only one 10bit adc, id=0, pin TOUT ####Syntax adc.read(id)