Mining Machine
while true do
local modem = peripheral.wrap("right")
modem.open(1)
local event, modemSide, senderChannel, replyChannel, message, SenderDistance = os.pullEvent("modem_message")
shell.run("clear")
if message == "on" then
print("Miner ON")
os.sleep(2)
shell.run("moveNorth")
else
print ("Miner OFF")
end
os.pullEvent("redstone")
end
Control Computer
while true do
shell.run("clear")
if rs.getInput("left") == true then
print("redstone ON")
peripheral.call("right", "transmit", 1, 1, "on")
else
peripheral.call("right", "transmit", 1, 1, "off")
print("redstone OFF")
end
os.pullEvent("redstone")
end












