Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.setTextColor(colors.blue)
- modem = peripheral.wrap("back")
- modem.open(5555)
- modem.transmit(5555, 5555, "start-mining")
- function inform() --inform user
- print("Enter values:")
- os.sleep(0.4)
- end
- function putValues() --get and set Values
- for i = 1, 3, 1 do
- while not accepted do
- message = read()
- if tonumber(message) ~= nil then
- accepted = true
- modem.transmit(5555, 5555, message)
- end
- end
- accepted = false
- end
- end
- function receiveConfirm()
- event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- print(message)
- end
- -- Actual program
- inform()
- putValues()
- receiveConfirm()
Add Comment
Please, Sign In to add comment