basic nodemcu stuff in lua/
This commit is contained in:
12
lua/init.lua
Normal file
12
lua/init.lua
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user