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

Get pressure from Pneumaticcraft

Started by it1p, 30 June 2014 - 02:35 PM
it1p #1
Posted 30 June 2014 - 04:35 PM
Hello,

I'm searching for a while now how to get the pressure from Pneumaticcraft.

On the website of the mod there is are some commands listed:

-getPressure(), getPressure(<side>) – Will get the pressure in the block. The side parameter is an optional parameter, and is currently only useful when getting the pressure from a Vacuum Pump, as it contains two different pressures.
-getDangerPressure() – This is a constant, it’ll be 5 bar for tier one machines, and 20 for tier two.
-getCriticalPressure() – This is a constant, it’ll be 7 bar for tier two machines, and 25 for tier two."


If I run the getPressure() thing i get the "attempt to call nil" error.

[SCREENSHOT]
Spoiler

Thanks in advance,
TIm
GamerNebulae #2
Posted 30 June 2014 - 07:07 PM
We've had this problem on the forums before. The problem is that it's only possible with machines (as far as I am concerned) and to read the pressure from a pipe, you need to use the Pressure Gauge Tubes (as far as I know, I do not play with the mod) and convert the redstone signal to the pressure. In the tool-tip of the pipe it says the formula.
KingofGamesYami #3
Posted 01 July 2014 - 01:01 AM
I messed with CC 1.57 and the latest pneumatic craft myself, for some reason it hasn't worked at all ( for me ). Thus said, I'm pretty sure it's pneumatic craft's fault.

local comp = peripheral.wrap("left") --#duh, wrap a machine (specifically, I wrapped a compresser since the wiki directly says the method is available.
print( comp.getPressure() )  --#try this...
result: attempt to call nil O.o

Forum:
Every machine running on compressed air
You can get the following info from any PneumaticCraft block that runs on compressed air (including the Air Compressor, Pressure Tube):
-getPressure(), getPressure(<side>) – Will get the pressure in the block. The side parameter is an optional parameter, and is currently only useful when getting the pressure from a Vacuum Pump, as it contains two different pressures.
-getDangerPressure() – This is a constant, it’ll be 5 bar for tier one machines, and 20 for tier two.
-getCriticalPressure() – This is a constant, it’ll be 7 bar for tier two machines, and 25 for tier two.