Jump to content




Bundled Cable Help


  • You cannot reply to this topic
4 replies to this topic

#1 Alcheya

  • Members
  • 24 posts

Posted 05 September 2012 - 05:18 PM

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...

#2 Kingdaro

    The Doctor

  • Members
  • 1,636 posts
  • Location'MURICA

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:
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 Alcheya

  • Members
  • 24 posts

Posted 05 September 2012 - 09:11 PM

thanks a million!

#4 snoble2022

  • Members
  • 100 posts
  • LocationSomewhere near the local computer store?

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)

#5 remiX

  • Members
  • 2,076 posts
  • LocationSouth Africa

Posted 27 December 2012 - 09:12 PM

View Postsnoble2022, on 27 December 2012 - 03:17 PM, said:

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)

Won't even work.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users