Nesse espaço vamos guardar algumas dicas da linguagem Lua. Os tutoriais estão nos links abaixo.
Porta Serial:
Escrever:
wserial = io.open("/dev/ttyACM0","w") wserial:write("Oláaaaaa!!!!") wserial:flush()Ler:Links:http://stackoverflow.com/questions/25204242/how-to-read-from-a-serial-port-in-luahttp://luatut.comhttp://www.tutorialspoint.com/lua/http://www.lua.org/pil/http://lua-users.org/wiki/LuaTutorialhttp://www.martin.cc/OpenWrt/lucihttp://www.lanoms.org/2005/anaiscd/1999/10-2.pdfhttp://www.fredshack.com/docs/lua.htmlhardware: http://h-wrt.com/en/doc/sp http://www.picaxeforum.co.uk/showthread.php?20365-Picaxe-to-internet-via-TP-Link-WR703N-router-with-openWrt/page3 https://www.domoticz.com/forum/viewtopic.php?f=15&t=1300 http://ediy.com.my/index.php/projects/item/99-wireless-router-remote-control-car?highlight=YToxOntpOjA7czo3OiJvcGVud3J0Ijt9 https://barracudadrive.com/LuaServerPages.lsp https://importhack.wordpress.com/2014/11/22/how-to-use-ep8266-esp-01-as-a-sensor-web-client/script: https://github.com/3epnm/lua-data-logger https://forum.openwrt.org/viewtopic.php?id=42834 http://www.gl-inet.com/forums/topic/connecting-the-core-to-the-arduino-nano/Funções e etc (retirado de http://lua-users.org/lists/lua-l/2004-04/msg00355.html)math = {} math.abs = abs math.acos = function(x) return rad(acos(x)) end math.asin = function(x) return rad(asin(x)) end math.atan = function(x) return rad(atan(x)) end math.atan2 = function(x,y) return rad(atan2(x,y)) end math.ceil = ceil math.cos = function(x) return cos(deg(x)) end math.deg = deg math.exp = exp math.floor = floor math.log = log math.log10 = log10 math.max = max math.min = min math.mod = mod math.pi = 3.14159265358979323846 math.pow = pow math.rad = rad math.sin = function(x) return sin(deg(x)) end math.sqrt = sqrt math.tan = function(x) return tan(deg(x)) end math.frexp = frexp math.ldexp = ldexp math.random = random math.randomseed = randomseed os = {} os.date = date string = {} string.byte = strbyte string.char = strchar string.dump = __unavailable string.find = strfind string.format = format string.gsub = gsub string.len = strlen string.lower = strlower string.rep = strrep string.sub = strsub string.upper = strupper table = {} table.concat = __unavailable table.foreach = foreach table.foreachi = foreachi table.getn = getn table.insert = tinsert table.remove = tremove table.sort = sort table.setn = __unavailable