Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Initialazing Soaryng Drive A - COMPLETE")
- controller = peripheral.wrap("bottom")
- list = controller.listAvailableItems()
- count = 0
- print("Scanning...")
- for number, item in pairs(list) do
- count = count + item.count
- print(item.name)
- end
- free =math.floor(240 - count)
- print()
- print("Free space: "..free)
- mon1 = peripheral.wrap("top")
- mon2 = peripheral.wrap("monitor_0")
- mon1.setBackgroundColor(colors.white)
- mon2.setBackgroundColor(colors.white)
- mon1.setTextColor(colors.black)
- mon2.setTextColor(colors.black)
- mon1.setCursorPos(1,1)
- mon2.setCursorPos(1,1)
- mon1.clear()
- mon2.clear()
- mon1.write("Free:")
- mon2.write("Free:")
- mon1.setCursorPos(1,2)
- mon2.setCursorPos(1,2)
- mon1.write(free)
- mon2.write(free)
- mon1.setCursorPos(1,4)
- mon2.setCursorPos(1,4)
- mon1.write("Total:")
- mon2.write("Total:")
- mon1.setCursorPos(1,5)
- mon2.setCursorPos(1,5)
- mon1.write("240.0")
- mon2.write("240.0")
- os.sleep(100)
- os.reboot()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement