Posted 01 May 2013 - 01:26 AM
Hey guys so I had a thread going but my account just vanished somehow… anyways what I am wanting to do is to make a system that can read if an engine is working and if it is to send a signal to a main computer which then prints "name of engine" running. If the engine is not running it will send "name of engine" disabled. Also if engine is not running the main computer will send a code back and kick in a secondary engine via redstone or something. I will have several engines and want this all to be displayed on a monitor on the left side of my computer continuously. So what I do have…
Right now I have a computer at the engines and am trying to figure out how to write a code for them in the startup that can send a message (via rednet) to the main computer about the status of the engine and if the engine is not functioning to create a redstone signal.
This is the code I have (sorry that it is primitive, I am new to Lua)
rednet.open("top")
while true do
if redstone.setInput("bottom", true) then
rednet.send(6,"Farm Functioning")
else
rednet.send(6, "Farm Disabled")
redstone.setOutput("bottom", true)
end
end
when I reboot the computer I get: startup:4: attempt to call nil
If someone could help me with diagnosing the problem and possible help me with some code for the rest I would be greatly appreciative. Also, how do I make it so that everything shows on a monitor to the left?
ALSO, I am playing on mindcrack so I do not have the latest version of computercraft, sorry I dont know what version I do have.
Thanks,
Braden
Right now I have a computer at the engines and am trying to figure out how to write a code for them in the startup that can send a message (via rednet) to the main computer about the status of the engine and if the engine is not functioning to create a redstone signal.
This is the code I have (sorry that it is primitive, I am new to Lua)
rednet.open("top")
while true do
if redstone.setInput("bottom", true) then
rednet.send(6,"Farm Functioning")
else
rednet.send(6, "Farm Disabled")
redstone.setOutput("bottom", true)
end
end
when I reboot the computer I get: startup:4: attempt to call nil
If someone could help me with diagnosing the problem and possible help me with some code for the rest I would be greatly appreciative. Also, how do I make it so that everything shows on a monitor to the left?
ALSO, I am playing on mindcrack so I do not have the latest version of computercraft, sorry I dont know what version I do have.
Thanks,
Braden
Edited on 01 May 2013 - 09:03 AM