I have a mod installed and with the DNS Techpack. and I need an option to monitor the air pressure going threw a tube. Below is a sample code I have in lua for CC (Computercraft) and I need this to work in OC (Opencomputers)
p = peripheral.wrap("back")
while true do
x = p.getPressure()
print("Current pressure " .. x)
if x < 4 then
rs.setOutput("right", true)
print("Pressure low, Starting Engines")
else
rs.setOutput("right", false)
end
sleep(5)
end
This code monitors the back of the pc and reads the air pressure and displays the amount of bars, If the amount of bars falls below. 4.0. It sands a redstone signal and engines start up and keep the air pressure up to 4.0 bars
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
I have a mod installed and with the DNS Techpack. and I need an option to monitor the air pressure going threw a tube. Below is a sample code I have in lua for CC (Computercraft) and I need this to work in OC (Opencomputers)
This code monitors the back of the pc and reads the air pressure and displays the amount of bars, If the amount of bars falls below. 4.0. It sands a redstone signal and engines start up and keep the air pressure up to 4.0 bars
Does any one know how to do this in OpenC
Thanks
Ice
Link to post
Share on other sites