basic nodemcu stuff in lua/

This commit is contained in:
cqc
2021-07-24 00:53:12 -05:00
commit 9b342a7f34
10 changed files with 199 additions and 0 deletions

12
lua/init.lua Normal file
View File

@ -0,0 +1,12 @@
spimaster = spi.master(spi.HSPI, {sclk = 18, mosi = 23, miso = 19}) -- HSPI (LCD/TF Card)
function tryfile(f)
if file.exists(f) then s,err=pcall(function() dofile(f) end) if not s then print(err) end
else print('ERR: "'..f..'" does not exist...') end
end
tryfile('display.lua')
tryfile('wifi.lua')
function ls() print(sjson.encode(file.list())) end