reading energy level from redstone energy cell

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

Azurl

New Member
Jul 29, 2019
172
0
0
Hi! I want to automate power generation from industrialcraft to buildcraft with electrical engines, I have hooked up their output to a redstone energy cell. Can a computercraft computer read the energy level somehow? I want to make it activate the engines when the cell is empty, and turn them off when the cell is full. possible?
 
i think there is or is atleast plans from what i have seen in DW20s videos of a block that computercraft can use in the same way a gate works for buildcraft pipes so it is or will be possible
 
If that block ain't there currently:
hook a power pipe with a gate on it to the cell (pipe (not wooden!) leading nowhere). Set the gate to full = signal on and empty = signal on. Whenever your CC gets a rising edge, act accordingly. (cell becomes empty -> rising edge -> CC starts the engines -> falling edge -> cell becoms full after a while -> rising edge -> CC stops engines)
 
which gate would that be? because with a Gate, all the alternatives I get when one piece of golden conductive pipe is connected to the cell with the gate in it are: pipe empty, power traversing, redstone signal on, redstone signal off.
 
Since hookup up a pipe to a energy conduit would lead to all the power being drained I don't think that's feasable.
 
Structure Pipes are what you use when you don't want the pipe itself to interact with something, but you want a gate to. I was addressing the energy drain potential problem Hydra mentioned.
 
Alright, I understand that, but which gate exactly do I use? the basic gate won't give me energy level or tank status or anything.
 
Diamond Autarchic Gates seem to be able to detect energy levels. So can Gold. And Iron for that matter. Uh... doesn't look like you even need an Autarchic Gate to check that.

Edit: Okay, now I'm REALLY confused. Even the most basic Gate can detect No Energy, Energy Stored, Can Store Energy, and Full Energy. I'm not sure what you're doing to not see these options.
 
Hmmmm..
Place a structure pipe beside the Redstone Energy Cell and place any Buildcraft Gate onto it. There should be a buggy conditional "Full energy" in the left box. Set it to output a redstone signal in the right box.
Connect some redstone wire to you're ComputerCraft PC (Or just hard wire it to your engines with a redstone inverter)

This isn't 100% what you're after, but it will stop you're engines running when they don't have to.

Edit: You have to save-and-quit after placing the gate (With both boxes left blank). On re-loading the "Full energy" condition should be present
 
the pipe wires won't connect to the gates. or anything, do I need something to make them connect?
 
Gates don't work with TE energy cells in 1.4.2. You need to be on the latest version for that to work. In the latest version attaching a gate to a power pipe attached to the cell will give an option for emitting a signal on various levels of energy.
 
Gates don't work with TE energy cells in 1.4.2. You need to be on the latest version forthat to work. In the latest version attaching a gate to a power pipe attached to the cell will give an option for emitting a signal on various levels of energy.



FTB 1.4.2
It may not be pretty or exactly what you would like but it works flawlessly for turning off engines when the cell is full
 


FTB 1.4.2
It may not be pretty or exactly what you would like but it works flawlessly for turning off engines when the cell is full

If that was a response to it working, I don't consider a buggy implementation as 'working.'
 
I got it to work! Iron or gates worked with the pipe wires, and it stops sending signal when the cell isn't full, excellent
 
Is there any way to read the exact amount of energy in a redstone energy cell (e.g. to display on a monitor)? I'm guessing not, but I wanted to check.
 
Hi! I want to automate power generation from industrialcraft to buildcraft with electrical engines, I have hooked up their output to a redstone energy cell. Can a computercraft computer read the energy level somehow? I want to make it activate the engines when the cell is empty, and turn them off when the cell is full. possible?

Very late on replying to your question. Yes, you can use ComputerCraft to read a redstone energy cell. I see people where they said to use gates and so forth but this is very useful and can do a lot more than any gate. Here is a very simple example how to read the cell via ComputerCraft.
Code:
cell = peripheral.wrap("bottom")
cellStored = cell.getEnergyStored()
cellFull = cell.getMaxEnergyStored()
cellPercent = math.floor(100*cellStored/cellFull)

print(tonumber(cellStored))
print(cellFull)
-- Better format
print(tonumber(cellStored).."/"..cellFull.." "..cellPercent.."%")

On being more powerful than any gate, is you can use if then statements to do certain things, like change the output or input of the cell. You could have an exact number matched before it does something e.g. like 20% or a specific number 134777. Hope this helped.
 
Last edited: