This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
CardingiSFun's profile picture

Help me with a redstone problem

Started by CardingiSFun, 18 October 2012 - 09:42 PM
CardingiSFun #1
Posted 18 October 2012 - 11:42 PM
So im using bundled cable and i was wondering how do i send a redstone pulse out of a certain color?

Please help me thanks.
Noodle #2
Posted 18 October 2012 - 11:44 PM
rs.setBundledOutput("SIDE", colors.COLOR)
CardingiSFun #3
Posted 18 October 2012 - 11:46 PM
then what would i do? cause im using multiple colors and i want to do multiple outputs from the back cable only
CardingiSFun #4
Posted 18 October 2012 - 11:52 PM
Nvm u were right
CardingiSFun #5
Posted 19 October 2012 - 12:52 AM
http://i.imgur.com/7ZMzd.png
i get this error and on that line
the code is rs.setBounledOutput("back", colors.white)
Espen #6
Posted 19 October 2012 - 01:01 AM
http://i.imgur.com/7ZMzd.png
i get this error and on that line
the code is rs.setBounledOutput("back", colors.white)
An "attempt to call nil" means that you tried to call a function that doesn't exist.
Most of the time that is a tell-tale sign for a typo.

In your case you tried to call rs.setBounledOutput, when really it should be rs.setBundledOutput.
CardingiSFun #7
Posted 19 October 2012 - 01:32 AM
So this is the updated code: rs.setBundledOutput("back", colors.orange)
but i want to make it pulse once just turn on then turn off how would i do that?
Espen #8
Posted 19 October 2012 - 02:22 AM
So this is the updated code: rs.setBundledOutput("back", colors.orange)
but i want to make it pulse once just turn on then turn off how would i do that?

For example:

rs.setBundledOutput("back", colors.orange)  -- set output to orange
sleep(0.5)  -- sleep for half a second
rs.setBundledOutput("back", 0)  -- turn off the output
Mind you though this doesn't preserve the value the output was in before the pulse. It will just turn off the output completely after the pulse.
If you want to preserve the output from what it was before the pulse, then remember to save it to a variable beforehand, or better yet, make use of colors.combine() and colors.subtract().
Also see "help redstone" and "help redpower" for more info.