Setting up a Gate Reading Mining turtle to...
Saberwolfcdw 15 Sep 2013
Title: Setting up a Gate Reading Mining turtle to read a BC Tank or Railcraft Iron Tank level and place a BC Pipe when tank is full/empty.
Wanting to do it in a loop so it'll place the pipe when the tank not full and remove when it is. Very New to computer craft and I have built the turtle but I stink bad at programming. Just a little direction would be nice. Need to know how to wrap the gate, set the gate to read the tank and so on.
Thanks.
Wanting to do it in a loop so it'll place the pipe when the tank not full and remove when it is. Very New to computer craft and I have built the turtle but I stink bad at programming. Just a little direction would be nice. Need to know how to wrap the gate, set the gate to read the tank and so on.
Thanks.
BigTwisty 16 Sep 2013
Wrap the gate with
It might be left, you'll have to look at the turtle to see what side the gate reader is on.
The commands for the wrapped gate reader are like this:
Replace val with the gate code you want to check. You can get the gate codes by placing a gate on a pipe next to what you are reading and clicking through the available gate codes.
I'll leave the looping and the rest to you, as that will be a good learning excercise for you.
reader = peripheral.wrap("right")
It might be left, you'll have to look at the turtle to see what side the gate reader is on.
The commands for the wrapped gate reader are like this:
state = reader.get() if state["val"] then ...
Replace val with the gate code you want to check. You can get the gate codes by placing a gate on a pipe next to what you are reading and clicking through the available gate codes.
I'll leave the looping and the rest to you, as that will be a good learning excercise for you.