Topic: How Do I Have a turtle check for a redstone signal to execute a program I wrote?
that's it Thanks! -Agentmoo12
0
Using redstone signal to start program
Started by agentmoo12, Sep 04 2013 01:54 AM
3 replies to this topic
#1
Posted 04 September 2013 - 01:54 AM
#2
Posted 04 September 2013 - 11:50 AM
Split into new topic.
#3
Posted 04 September 2013 - 12:24 PM
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.
ie
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.
ie
while 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.
#4
Posted 04 September 2013 - 03:33 PM
OmegaVest, on 04 September 2013 - 12:24 PM, said:
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.
ie
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.
ie
while 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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users