Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- --richiedo i valori
- print("Inserire l'intervallo: [float]")
- intervallo = read()
- print('Inserire il lato: [str]')
- side = read()
- --apro e scrivo il programma
- file = io.open("startup","w")
- file:write(
- 'lato = '..side..'\n' ..
- 'Durata = 0.05\n' ..
- 'Intervallo = '..intervallo..'\n' ..
- 'while true do\n' ..
- '\trs.setOutput(lato, true)\n' ..
- '\tsleep(Durata)\n' ..
- '\trs.setOutput(lato, false)\n' ..
- '\tsleep(Intervallo)\n' ..
- 'end'
- )
- file:close()
- print('Setup completed! Rebooting...')
- sleep(1)
- os.reboot()
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement