Hello Lua - Seeed-Studio/Lua_for_LinkIt_One GitHub Wiki
After downloading the lua firmware into LinkIt ONE, use a serial terminal like putty to access lua shell.
Blink
pinMode(13, 1)
while true do
digitalWrite(13, 1)
msleep(1000)
digitalWrite(13, 0)
msleep(1000)
Note: while loop will make lua shell stops reading users' input, a restart is required to try new things.
or use a timer
pinMode(13, 1)
d13 = 0
function blink()
d13 = 1 - d13
digitalWrite(13, d13)
end
t0 = timer.create(1000, blink)