Posted 21 January 2013 - 11:26 AM
I was looking into Mass Fabricator from IC2 automation - how to feed it with scrap and if you are out of scrap then to turn it off.
I tried BuildCraft gates but they didnt seem to work well for me then I found simple and cheap solution that I like.
1. Place basic turtle right below Mass Fabricator a copy this to turtle's startup program: http://pastebin.com/KecjL3zH
2. Feed your scraps from Recycler directly to the turtle - BuildCraft pipes will do the job nicely
How does this work:
Turtle cycle through all of 16 slots of inventory and try to dropUp() scraps to Mass Fabricator.
As it runs out of scraps it will turn Mass Fabricator off by redstone signal. Then wait 5 minutes to start again.
All in infinite loop.
Note:
- you need to run this as turtle's startup program (simply name the file "startup") otherwise when you load your world, fabricator will starts running without scraps.
- turtle cant check inventory of fabricator so when it shut down, there is usually remaining stack of scraps in fabricator. This is only downside of this solution, but if you have quarry and steady supply of scrap then its not problem at all.
- I use Filter (from RedPower2) to pull UU-matter from fabricator … guest what? if you have Filter on side of Fabricator, it is affected by turtle's redstone signal … so i added 3 lines (uncomment lines 9-11 in code) and now turtle act also as redstone timer for Filter. works perfectly.
The program itself is very simple but still I like it and wanted to share my idea. Hope someone finds it usefull.
I tried BuildCraft gates but they didnt seem to work well for me then I found simple and cheap solution that I like.
1. Place basic turtle right below Mass Fabricator a copy this to turtle's startup program: http://pastebin.com/KecjL3zH
2. Feed your scraps from Recycler directly to the turtle - BuildCraft pipes will do the job nicely
How does this work:
Turtle cycle through all of 16 slots of inventory and try to dropUp() scraps to Mass Fabricator.
As it runs out of scraps it will turn Mass Fabricator off by redstone signal. Then wait 5 minutes to start again.
All in infinite loop.
Note:
- you need to run this as turtle's startup program (simply name the file "startup") otherwise when you load your world, fabricator will starts running without scraps.
- turtle cant check inventory of fabricator so when it shut down, there is usually remaining stack of scraps in fabricator. This is only downside of this solution, but if you have quarry and steady supply of scrap then its not problem at all.
- I use Filter (from RedPower2) to pull UU-matter from fabricator … guest what? if you have Filter on side of Fabricator, it is affected by turtle's redstone signal … so i added 3 lines (uncomment lines 9-11 in code) and now turtle act also as redstone timer for Filter. works perfectly.
The program itself is very simple but still I like it and wanted to share my idea. Hope someone finds it usefull.
while true do
redstone.setOutput("top", false)
print("feeding scraps")
for i=1,16 do
turtle.select(i)
while (turtle.getItemCount(i)>0) do
if turtle.dropUp()==false then
-- redstone.setOutput("top",true)
-- sleep(0.5)
-- redstone.setOutput("top",false)
-- uncomment 3 lines above, if you use RP2 Filter to pull UU from Fabr.
sleep(5)
end
end
end
print("out of scraps .. turning off")
redstone.setOutput("top", true)
for i=5,1,-1 do
print("sleeping for "..i)
sleep(60)
end
end