Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 0
iceman11a

How to monitor air pressure

Question

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

 

Does any one know how to do this in OpenC

 

Thanks

Ice

 

Link to post
Share on other sites

16 answers to this question

Recommended Posts

  • 0

Ok, does this have to be a machine or can it be a tube. Or ?. The idea is that I can play with it. to check it for my self. It would be an idea to get some kind of an idea so that I don't spend hours playing with some thing that doesn't work.

 

and do you know how many adapters I can have on one PC system. will the pc just list it with a new id. I'll have to play with that all so.

Last is there a limit on the length on how much network cable I can place down. Can I stretch the network cable. I need to make some poles from blocks and run it 1000 blocks up to 4000 blocks away from the PC and Servers.

 

Thanks for your help

 

UPDATE: getPressure() is not supported any more.

Link to post
Share on other sites
  • 0

Thanks how ever adigyran, You told me that you were using computercraft. The same options your telling me that work in computercraft also work in opencomputers and that's not true. I all ready looked That doesn't work.

 

JoshTheEnder, That could be very true. The idea is that this is a opencomputer forum and the other guy should have known that and tested his idea in opencomputer, As far as I can see there is no way to check for the pressure in opencomputer.

Link to post
Share on other sites
  • 0

proof that works

ComputerCraft1.64

Computronics-1.7.10-1.0.5

OpenComponents-MC1.7.10-0.2.0.20-universal

OpenComputers-MC1.7.10-1.3.4.63-universal

OpenPeripheralAddons-1.7.10-0.2.0-snapshot-122

OpenPeripheralCore-1.7.10-0.5.0-snapshot-142

PneumaticCraft-1.7.10-1.2.8-15-universal

all this stuff works both in CC and OC for me through adapter block

Link to post
Share on other sites
  • 0

Ok, That's why. Lets look at your list

 

ComputerCraft1.64 (I don't have this mod nor do I want it)

Computronics-1.7.10-1.0.5 ( I don't know what this mod is I have to see if it was added to the modpack I have)

OpenComponents-MC1.7.10-0.2.0.20-universal  (Yes. I have this one)

OpenComputers-MC1.7.10-1.3.4.63-universal (Yes I have this one)

OpenPeripheralAddons-1.7.10-0.2.0-snapshot-122 (I don't think these are added to my mod)

OpenPeripheralCore-1.7.10-0.5.0-snapshot-142 ( This one I don't think have been added to my mod)

PneumaticCraft-1.7.10-1.2.8-15-universal (this version haven't been updated in my mod pack at this time)

 

At the time I was playing with OP and in MC 1.6.4. This option didn't exist. I checked and the mod Computronics-1.7.10-1.0.5 is not a part of the modpack. I don't think nor will I think that DNS will add this mod. CC or Computercraft is a mod I don't like. Because of the limits on this mod. I don't think that OP will be getting added to the mod all so. Like I said. The option I want is not available in the modpack I have. I don't have access to the server to add these mod's. How ever  can you get me a link for these mods.

 

Computronics-1.7.10-1.0.5

OpenPeripheralAddons-1.7.10-0.2.0-snapshot-122

OpenPeripheralCore-1.7.10-0.5.0-snapshot-142

PneumaticCraft-1.7.10-1.2.8-15-universal (I Have 1.2.6) I couldn't find this mod

 

Ice

Link to post
Share on other sites
  • 0

Well then I'm all confused. Do I need all of those extra mods or what? Your saying I need all of those mods and your saying just install CC. well will CC do it all for me or will I have to install all of the mods from the other post. Please tell me just what I need. This is why you have me so confused.

Link to post
Share on other sites
  • 0

my opinion is methods in Pneumatic craft only active when CC is installed. Try just install CC,Open computer and Open components. OpenPeripherals and rest i think you don`t need (this just example, i even have access to computer craft peripherals in OC if i have CC) (Sorry for grammar mistakes, English is not  my native language)

Link to post
Share on other sites
  • 0

not a problem. Ok, I run a mod pack I don't know if i can install those mods. Some of them I all ready have installed. I just don't have OpenPeripherals and i know this has nothing to do with it sense I all ready check this my self. This is still in the Alpha and it was never added. So that I do know.

Link to post
Share on other sites

Join the conversation

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.