Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monitor = peripheral.find("monitor")
- local modem = peripheral.find("modem")
- local dec = peripheral.find("energyDetector")
- term.clear()
- monitor.clear()
- monitor.setCursorPos(1,1)
- term.setCursorPos(1,1)
- print("---Output FE/t---")
- monitor.write("Output")
- while rs.getInput("front") == false
- do
- local rate = dec.getTransferRate()
- local formatted_rate = string.format("%d", rate)
- formatted_rate = formatted_rate:reverse():gsub("(%d%d%d)","%1,")
- formatted_rate = formatted_rate:reverse():gsub("^,", "")
- modem.transmit(24,5,formatted_rate)
- term.setCursorPos(5,2)
- monitor.setCursorPos(1,2)
- term.clearLine()
- monitor.clearLine()
- term.setCursorPos(5,2)
- monitor.write(formatted_rate)
- print(formatted_rate)
- sleep(0.25)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement