Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function redPulse(side)
- redstone.setOutput(side,true)
- os.sleep(0.1)
- redstone.setOutput(side,false)
- end
- function saveStatus(x,filename)
- local success = false;
- if filename == nil then filename = "status.txt"; end
- if type(x) == "string" then
- local fh = fs.open(filename,"w")
- fh.write(x)
- fh.close()
- success = true;
- end
- return success
- end
- function readStatus(filename)
- if filename == nil then filename = "status.txt"; end
- local fh = fs.open(filename,"r")
- local output = fh.readAll()
- fh.close()
- return output
- end
Advertisement
Add Comment
Please, Sign In to add comment