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

Lights program

Started by ShadowZenoX, 06 June 2012 - 08:24 PM
ShadowZenoX #1
Posted 06 June 2012 - 10:24 PM
so i have a setup but im not good with computercraft but i want to have like
a program where it turns on lights so like
(1)Turn on first set of lights
(2)Turn on second set of lights
(3)Turn on both lights
(4)Turn off on lights
how would i do that like when i type in the number it would pulse to it i have a bundled cable connect to red and blue so can anyone help
ShadowZenoX #2
Posted 07 June 2012 - 12:17 AM
bump bumpbumpbumpbump bumpbumpbump bump bumpbump bumpbump bumpbump bump bumpbump bumpbump bump bumpbump bumpbump bump bumpbumpbump bumpbump bumpbump bump bumpbump bump bump bumpbump bump bumpbump bumpbump bumpbump bumpbump bumpbump bumpbump bumpbump bump
Zepher48 #3
Posted 07 June 2012 - 08:39 AM
Take a look at this API
http://computercraft.info/wiki/index.php?title=Redstone_(API)

I think you will be wanting to use this function rs.setBundledOutput(string side, int colors)
weaponologist #4
Posted 10 June 2012 - 12:54 AM
i'm not very experienced but this may be useful.

you could find a good password protected door code that someone has created (there are plenty about) and where the password is supposed to go you could put 1 and then keep repeating it but obviously put 2, 3, 4 so that when you type any of the numbers a redstone signal is sent.
you would also have to change which face of the computer the redstone is sent out to, (i dont know code so i'll just write in english :D/>/>) for the first set of lights the cable on the left could be activated (redset left) and for the second set of lights (when you type 2) the same but on the right. and for 3, redset left and right. for 4 i dont know if theres a command but something along the lines of redstop lol ;)/>/> something to deactivate the redstone signals :)/>/>

as i said, I'm inexperienced but I don't see any reason why it wouldn't work. hope this helped :D/>/>