12 posts
Posted 04 September 2015 - 03:26 AM
Need some help trying to loop my coffee automation program to make milk coffee everytime it recieves a rednet signal
http://pastebin.com/8H3Mfef6
7083 posts
Location
Tasmania (AU)
Posted 04 September 2015 - 06:32 AM
You have a run() function that opens a rednet side, but you never call it. Your check for the "dark" message also seems randomly placed…
Try it like this:
rednet.open("back")
while true do
local id,message = rednet.receive()
if id == 34 and message == "milk" then
redstone.setOutput("right", true)
sleep(5)
redstone.setOutput("right", false)
elseif message == "dark" then
rednet.broadcast("I'm milk coffee not dark")
end
end