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

New to programming and need a little help

Started by yosomith, 19 January 2013 - 09:44 PM
yosomith #1
Posted 19 January 2013 - 10:44 PM
Ok so I'm using FTB Direwolf20 pack v4. What I want to do is set up a computer system that will monitor my power levels. I'm not worried about IC2 power but I want to get a bunch of Redstone Energy Cells and hook them up to a computer and have it read each individual ones power level (can be just a percentage if exact numbers can't be done) and an over all power level for my base. I'd also like to output it to a monitor but I think I can manage to do that bit myself. Can this be done?
W00dyR #2
Posted 20 January 2013 - 12:35 AM
I dont think there is a easy way to read the redstone energy cells power level, I'm not sure if the energy cells can do this, I know IC2 storage things can, but is there any option to send a redstone signal if it's full or something? Maybe try something with gates in the pipes that connect to it, that output a redstone signal when its full.

You can read the redstone signal with a computer and perhaps hook up multiple pipes that give a different output for the current energy stored, but I'm not familiar with all these gates and energy cells so I cant help you any further with that :P/>

I suggest doing some research in creative mode, or looking up guides on the gates and energy cells.
theoriginalbit #3
Posted 20 January 2013 - 12:42 AM
Here is the easiest way to see if a block can support being a peripheral for a computer AND if it can be what you can do with it… Type this into the Lua prompt

To see if its a peripheral:
Another way is to do this

print( peripheral.getType( "left" ) )

To see what functions can be called on it:

print( peripheral.getMethods( "left" ) )

Replacing left with the side the peripheral is on for both functions… If the block cannot be used as a peripheral this will output a blank line followed (maybe) by a number. If the block can be used as a peripheral it will show a name and the second piece of code will tell you all the functions that you can use with it…