Posted 04 September 2013 - 02:54 AM
Topic: How Do I Have a turtle check for a redstone signal to execute a program I wrote?
that's it :)/> Thanks! -Agentmoo12
that's it :)/> Thanks! -Agentmoo12
while true do
evt, arg1 = os.pullEvent("redstone")
if rs.getInput(side) then
-- Program
end
end
You haven't defined "side".The easiest way would be to include a massive while loop with an event pull that would look for redstone only, then fire the rest of the program.
iewhile true do evt, arg1 = os.pullEvent("redstone") if rs.getInput(side) then -- Program end end
However, I get the sense that you also want this turtle to run other functions as well. Unfortunately, that is not so simple. And the above only works for up to six functions at a time (supposing no peripherals). But, this should give you a starting place, at least.