Zorix Posted May 2, 2014 Posted May 2, 2014 I have been trying to come up with a way to use Computercraft to turn on and off electrical service to different buildings on my map. I have set up various buildings with a central power station and thought it would be interesting to use Computercraft to turn on and off electrical service to buildings. I have already got an addon installed that allows me to use colored bundled cables and have tested with redstone activated devices without problem, but I can't figure a way to interrupt and complete an electrical connection. I have tried pistons, different types of wiring, and many things I can't even remember. Is this even feasible or am I wasting my time? Thanks. Quote
Discord Moderator plowmanplow Posted May 2, 2014 Discord Moderator Posted May 2, 2014 You can use ComputerCraft with RedNet cables from MFR (more elegant than Bundled Cable from Project Red) to turn Energy Cells from Thermal Expansion on and off. Quote
Zorix Posted May 2, 2014 Author Posted May 2, 2014 Thanks for the suggestion. From what I have read, the ability to access colored cables using redstone library has been removed so it's necessary to use a peripheral addon to accomplish this. Is there another way? I want the computer to control more signals than it has sides. As for signals to energy cells, I like that idea but I was hoping to apply signal to a cable so I didn't have to have strange storage cell configurations. Quote
allnet Posted May 3, 2014 Posted May 3, 2014 (edited) In case you want the Computers from ComputerCraft to handle redstonesignals you can use this: Add a Bundled Cable at the side of the computer and write a script with this command rs.setBundledOutput("left", colors.red) "left" is the output side for example: top, bottom, back, left, right "colors.red" ist the color inside the bundled cable just write instead of "red" the color you need. If you want to set multiple colors with just one Bundled Cable then use rs.setBundledOutput("left", colors.red + colors.white) You need to stick a colored cable at the end of the bundled cable btw And if you want to turn the Redstonesignal off you need rs.setBundledOutput("left", colors.red + colors.white, 0) Edited May 3, 2014 by allnet Quote
Discord Moderator plowmanplow Posted May 3, 2014 Discord Moderator Posted May 3, 2014 (edited) @allnet: What he was referring to is that as of ComputerCraft (CC) 1.6 the bundled cable API is no longer integrated into CC from other mods. What that means is that if Project Red and MineFactoryReloaded (MFR) want to be able to connect their colored/bundled/rednet cables to a CC computer and have the "rs.setBundledOutput()" function as expected then ProjectRed and MFR need to integrate the CC API directly. I am desperately hoping that a new build of MFR will be coming out soon with the CC-1.6 API properly integrated. I have heard that ProjectRed will be doing so shortly. @Zorix: Since Tekkit is using CC 1.58 you can still use bundled cable (PR) or RedNet cable (MFR) with CC computers Bundled Cable API just fine. Edited May 3, 2014 by plowmanplow Quote
badkruka Posted May 3, 2014 Posted May 3, 2014 redstone API: http://computercraft.info/wiki/Redstone_%28API%29 colors API: http://computercraft.info/wiki/Colors_%28API%29 These API's with rednetcable are realy awsome to build your own programs to control stuff in tekkit. Quote
Zorix Posted May 4, 2014 Author Posted May 4, 2014 I actually checked the apis directory under the rom directory and there is no redstone API and I could not get bundled cable signals to work at all no matter what type of cable used. What I ended up using is this one http://www.minecraftforum.net/topic/2488603-164-project-red-peripheral/ which did work without a problem. Not sure how anyone else has gotten it to work. I have a feeling nobody has tried in a while. As far as controlling the flow of electricty, using the energy cell described above worked flawlessly so I am very thankful for the excellent help from everyone. Any other suggestions or ideas are appreciated too since I may not have thought of it. Thanks. Quote
badkruka Posted May 4, 2014 Posted May 4, 2014 (edited) connect a rednet cable on the back of the computer thats stands on the floor and then put a redstone behind the rednet cable. A flat surface on the edge of the rednet cable toward the redstone will now apear and the cross on it will have the colour white. (You can change the colour on the cross to those you can see in the color api I linked in the earlier post) Now enter the lua mode by typing lua and then enter in the computer. now type the following code. rs.setBundledOutput("back", 1) "back" = the side of the computer 1 = colors.white (in the colors api, you can use the decimal number or the Color name now the computer will send a redstone signal throu the rednet cable and lightup the redstone on the floor. If you change the colour on the cross on the rednetcable to another colour the redstone will stop glowing since the computer only sends a redstone signal on the colors.white band throu the rednet cable. Edited May 4, 2014 by badkruka Quote
Niverton Posted May 4, 2014 Posted May 4, 2014 I have an API you might want to have a look at: http://pastebin.com/JDpvZGdH Very simple, but can save you time and makes your code easier to read IMO Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.