Is there any way to regulate the amount of something that is piped?

  • 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

tyler f

New Member
Jul 29, 2019
119
0
0
I am piping sand into an electrolyzer but it only needs 15 every 50 sec, roughly, and feeding it through bc pipes and having an overflow protection is just messy and laggy so is there a machine to only do that amount or roughly that? Or something that is practically the same.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
Offhand, what I'd do is set up a computercraft computer set up to send fifteen redstone pulses to a wooden transport pipe with a redstone engine attached. it shouldn't be too hard to modulate the timing so you get fifteen over the course of fifty seconds, assuming that is what you want. If you want to get fifteen every fifty seconds, you'll need a bit more work which we can discuss if need be.

Wait, dur, why am I even thinking about using gates/pipes? Just put the turtle near the inventory, and tell it to pull out stuff as needed. You can make it pull out one item every three seconds, or fifteen items every fifty seconds. Turtles are wonderful.
 

trunksbomb

New Member
Jul 29, 2019
390
0
0
There's always Redpower regulators, or filters on a timer, or sorting machines. Man, I just need a Redpower Junkie title or something..

Alternatively, Railcraft loaders and unloaders can do this very precisely. The footprint is large and it's not the fastest by any means, though.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
I don't know how to code for turtles at all.

Then it is time to learn!

http://computercraft.info/wiki/Main_Page
http://computercraft.info/wiki/Turtle_(API)

Specifically, you will need these commands:

http://computercraft.info/wiki/Loops (FOR loop, or a WHILE loop)
http://computercraft.info/wiki/Os.sleep
http://computercraft.info/wiki/Turtle.suck
http://computercraft.info/wiki/Turtle.drop

LUA is an easy language to get into, and the reward for using turtles is truly vast!
 

tyler f

New Member
Jul 29, 2019
119
0
0
There's always Redpower regulators, or filters on a timer, or sorting machines. Man, I just need a Redpower Junkie title or something..

Alternatively, Railcraft loaders and unloaders can do this very precisely. The footprint is large and it's not the fastest by any means, though.

Avoiding redpower at all costs consider how trash it is as far as lag and updates go.
 

BlackFire

New Member
Jul 29, 2019
344
0
0
Can't you also use diamond gates to detect a number of a block and emit a signal? You can turn off the aurtartic gate on the chest you are pumping from.
 

tyler f

New Member
Jul 29, 2019
119
0
0
Then it is time to learn!

http://computercraft.info/wiki/Main_Page
http://computercraft.info/wiki/Turtle_(API)

Specifically, you will need these commands:

http://computercraft.info/wiki/Loops (FOR loop, or a WHILE loop)
http://computercraft.info/wiki/Os.sleep
http://computercraft.info/wiki/Turtle.suck
http://computercraft.info/wiki/Turtle.drop

LUA is an easy language to get into, and the reward for using turtles is truly vast!

I would rather have someone write what I need for me and pick it apart. I find it much easier to learn that way.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
I would rather have someone write what I need for me and pick it apart. I find it much easier to learn that way.

Code:
while true do
 print("Grabbing one sand, sir!")
 turtle.suckDown()
 print("Sending one sand, sir!")
 turtle.dropUp()
 print("And now we play the waiting game....")
 sleep(3)
end

That will grab one item from the inventory below the turtle (make it a chest full of sand), and then drop that upward (put a chest here, or the inventory you need to put the sand into [you can also use "turtle.drop()" to drop it on the "front" of the turtle]), and then it waits three seconds. This is roughly one sand over three seconds, or 16.6_ sand every fifty seconds. There will be a bit more of a delay from the suck and drop command, though. And this code is extremely basic, but very easy to understand and use/abuse.
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
Does it have a loop?

Yes, it does. The line "while true do" will make it loop. Also, I should have mentioned this before, but to STOP it, press and hold down the CTRL key, and then press the T key for about two seconds. That will [T]erminate the program.
 

trunksbomb

New Member
Jul 29, 2019
390
0
0
If you want your program to run when the computer is loaded, rather than running it manually, name your program startup. When the chunk a computer is in unloads (leave a non-chunkloaded area, restart server if SMP or close world in SSP), the computer will "turn off" and restart the next time that chunk is loaded. When it is starting up, it searches for a program called "startup" that it will run automatically.
 
  • Like
Reactions: Guswut

tyler f

New Member
Jul 29, 2019
119
0
0
If I make the turtle try to drop something in an inventory that is full, will it just hold onto it or throw it into the world? And, if he holds onto, once his inventory is full will he cease trying to grab things or at least not throw them into the world?
 

Guswut

New Member
Jul 29, 2019
2,152
0
0
If I make the turtle try to drop something in an inventory that is full, will it just hold onto it or throw it into the world? And, if he holds onto, once his inventory is full will he cease trying to grab things or at least not throw them into the world?


What will happen is that the command turtle.drop() will return a "FALSE", instead of a "TRUE". If you run JUST that command, it won't matter. But, if you want him to see if the inventory is full, and if it is not place something inside of it and then grab another item, try this:


Code:
print("Preloading one sand, sir!")
turtle.suckDown()
 
while true do
 if turtle.dropUp() then
  print("Sending one sand, sir!")
  turtle.suckDown()
  print("Grabbing one sand, sir!")
 else
  print("They are full up, sir!")
 end
 
print("And now we play the waiting game....")
sleep(1)
end

That should grab one sand to start you off, and then try and place it in the inventory. If it DOES place, then it'll grab a refill of sand and then wait one second and try again. If it does NOT work, it will wait one second, and then try again.
 

AlanEsh

New Member
Jul 29, 2019
907
0
0
Avoiding redpower at all costs consider how trash it is as far as lag and updates go.
Filters triggered by redstone signals from gates don't cause any lag/fps issues that I can tell. Once I got away from timers, my RP2 annoyances went away.
However I don't know what options the gate will give you when attached to an electrolyzer, have not tried that.
 

tyler f

New Member
Jul 29, 2019
119
0
0
Filters triggered by redstone signals from gates don't cause any lag/fps issues that I can tell. Once I got away from timers, my RP2 annoyances went away.
However I don't know what options the gate will give you when attached to an electrolyzer, have not tried that.

Many, many things in that mod are proven to cause lag. Routers, managers, mini blocks, necessity of clocks, redstone pipes, the list goes on.
 

jumpfight5

New Member
Jul 29, 2019
1,750
0
1
Many, many things in that mod are proven to cause lag. Routers, managers, mini blocks, necessity of clocks, redstone pipes, the list goes on.
For your purposes, you'd only really need two sorting machines. Or just one if you had a seperate electrolyzer. If you're filling it only with sand, it doesn't matter, no tubes needed. Actually, couldn't you set up an igneous extruder attached to a pulverizer that would output right into the Electrolyzer? Then control the amount of Si cells you want easily with regulation of tin cells.