Would anyone know how to send rs pulses via bundled cable or turn off a redstone signal to a wire without switching to another? I'm trying to condense the code a bit. For instance, condense the following (sending 2 pulses to white).
rs.setBundledOutput("back", colors.white)
sleep(0.75)
rs.setBundledOutput("back", colors.yellow[non-existent])
sleep(0.5)
rs.setBundledOutput("back", colors.white)
sleep(0.75)
rs.setBundledOutput("back", colors.yellow)
sleep(0.75)
print("Six To One"
sleep(1.0)
shell.run("eleServer")
What I'm using this for requires a huge amount of code/possible inputs since I would be using one on each floor of a 10 story building and each one would have to accept a vast number of pulses. (for instance, on floor 6 pressing "1" would send "sixToOne", receiving computer would received "sixToOne" and send 1 pulse to yellow (close door on floor 6 via flipflop/toggleswitch) and 48 pulses to blue (frame motor "UP" 48 blocks) then 1 pulse to white (open door on floor 1 via flipflop toggle switch).
It's 9 floors, would accept approximately 90 different inputs. 81 of them would be pulses ranging from 8 to 80... going to be a long night...
Bundled Cable Help
Started by Alcheya, Sep 05 2012 05:18 PM
4 replies to this topic
#1
Posted 05 September 2012 - 05:18 PM
#2
Posted 05 September 2012 - 08:43 PM
To send a "pulse" you would need to reset all outputs to 0 after sending them.
As for your question on shortening:
As for your question on shortening:
local function sendPulse(color)
rs.setBundledOutput('back', colors[color])
sleep(0.1)
rs.setBundledOutput('back', 0)
sleep(0.1)
end
Just implement this function and call, for example, sendPulse('white') twice.
#3
Posted 05 September 2012 - 09:11 PM
thanks a million!
#4
Posted 27 December 2012 - 03:17 PM
even better use this
[code]
function sendPulse(sColor, nTimes)
for i=1, nTimes do
rs.setBundledOutput('back', colors[color])
sleep(0.1)
rs.setBundledOutput('back', 0)
sleep(0.1)
[code]
function sendPulse(sColor, nTimes)
for i=1, nTimes do
rs.setBundledOutput('back', colors[color])
sleep(0.1)
rs.setBundledOutput('back', 0)
sleep(0.1)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












