Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor
- state = false
- monitor = peripheral.wrap("right")
- monitor.setTextScale(3)
- function Date()
- if fs.exists("date") == true then
- file = fs.open("date", "r")
- f = file.readAll()
- for i in string.gmatch(f, "%S+") do
- if state == false then
- monitor.setCursorPos(1,1)
- monitor.write("Uhrzeit: ")
- monitor.write(i)
- state = true
- else
- monitor.setCursorPos(1,2)
- monitor.write("Datum: ")
- monitor.write(i)
- state = false
- end
- end
- file.close()
- else
- monitor.write("No date-file found")
- end
- end
- while true do
- monitor.clear()
- monitor.setCursorPos(1,1)
- Date()
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement