Clever applications for Computercraft turtles and computers?

  • 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

Shabazza

New Member
Jul 29, 2019
87
1
0
I'd like to gather some clever applications for computers and turtles that are beyond the obvious.

So I'm looking for things like:
"Use a turtle instead of an MFR Grinder to kill mobs, because they yield more mob essence this way."

I love those nifty little turtles and I also like programming them.
If you know or already have expierience with such non-obvious applications, please share them here. :)
 

ljfa

New Member
Jul 29, 2019
2,761
-46
0
I'm using a computer to switch my Mass Fabricator of if the MFSU is <50% full. I don't really need it anymore because my power supply is good enough now.
I also wrote a program to monitor and fill up Essentia jars, similar to Direwolf's program.
 
  • Like
Reactions: Shabazza

Xheotris

New Member
Jul 29, 2019
94
0
0
I was planning on using them for a botania livingrock factory with a simple compare/replace program. Unfortunately they aren't 1.7 yet. :(
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
I'm using a computer to switch my Mass Fabricator of if the MFSU is <50% full. I don't really need it anymore because my power supply is good enough now.
Pfff, Nuclear Control "Range Trigger" + "Energy Sensor Kit" :p




Written quite a few different programs over the years to do different things. Described quite a few of the recent ones here:
http://forum.feed-the-beast.com/threads/rhns-1-6-monster-build-journal-and-guide-collection.42664/

Mostly been doing Touchscreens for everything possible lately :p Gives a nice tech feel to my build and sometimes just super handy.
Examples:
Alveary temperature control panel: http://pastebin.com/8LKYW1Ry
Engage Alveary heaters and fans by the touch of the screen to increase temperature to warm, hot or decrees to cold from a normal biome.

Automatic/manual control panel: http://pastebin.com/w3w1BLu3
I use this for toggling between having my Cursed Earth farm run automatically depending on Mob essence level, or by manual choosing it on and off on the touchscreen. A lever will toggle between the auto/manual state. Can be used for all kinds of other applications where you need to alternate between manual and automatic control of something.

Touchscreen selection for MFR autospawner using ME: http://pastebin.com/aNZZpBLM
Choose between up to 8 different mobs for your MFR autospawner setup by touchscreen. You can find the setup needed for this in the thread I linked above.

Turtle flower/seeds farm:http://pastebin.com/gL4ybdny
Will use bonemeal on a 5x5 grass area to farm flowers and seeds. Is robust to server restarts etc. if you build its enclosure to the specifications in the header of the code. Check the thread I linked for pictures of how it should look. You can boost the flower output by using bees to pollinate the grass.

Turtle "Grinder" mobfarm: http://pastebin.com/nRYFDYNg
For a melee turtle. Will attack repeatedly, but once in a while it will empty its inventory up into an inventory above the turtle.

Fuelcheck: http://pastebin.com/YzkbHQEa
Very simple little code that makes it easy to check fuel levels of the turtle. Just install on a turtle and name it something like "Fuel". Run it and it will display the current fuel level and do nothing else.



I DID NOT WRITE THESE TWO! I merely found them somewhere and stored them on my own pastebin for ease of use. Have since forgotten where I found them. All credit goes to whoever made them :p
Circle builder: http://pastebin.com/vjJSNLjU
Sphere/dome builder: http://pastebin.com/aLMDhttP
These will allow a turtle to build circles, spheres and domes automatically. Both programs should be fairly simple to figure out how to use by reading the descriptions in the top of the code etc.
 

portablejim

New Member
Jul 29, 2019
267
0
1
I was planning on using them for a botania livingrock factory with a simple compare/replace program. Unfortunately they aren't 1.7 yet. :(
Yea, that is really sad.
2014-07-27_14.31.33.png
 

Shabazza

New Member
Jul 29, 2019
87
1
0
Mostly been doing Touchscreens for everything possible lately :p Gives a nice tech feel to my build and sometimes just super handy.
Those clickable screens are really nifty. Never new this was possible.

Not so special. But I wrote an energy control program for BigReactors to adjust the power output to match the current demand and keep the internal buffer always full.
So it always runs as fuel efficient as possible.

Another program is a somewhat intelligent strip miner turtle. It mines a given amount of strips with given length.
It will set torches to prevent mob spawns, so I can inspect the strips after it. And it will also deal with obstructions by fallen sand, gravel or mobs
(Either dig it or kill it :D ) and has an auto-refuel and auto-return-unload-and-resume mechanism.
The only thing missing is a path maker functionality. There are often gaps with lava underneath where I have problems to cross them. So the next version will
probably place dirt / cobble blocks underneath to cover those gaps.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Those clickable screens are really nifty. Never new this was possible.
When I first heard about it, I thougt: wow this must be super complicated, I can never figure out how to do it. But when I finally looked up how it worked... Basically just an if loop telling if the "click event" was within your set bounds :p

This is really good for explaining how it works(or just stealing the code from):
 
  • Like
Reactions: ThomazM

ljfa

New Member
Jul 29, 2019
2,761
-46
0
You should use some kind of API when you have multiple buttons though...my essentia code right now is like
Code:
if y >= ... and y <= ... then
  if x >= ... and x <= ... then
    ......
It's quite a mess.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
You should use some kind of API when you have multiple buttons though...my essentia code right now is like
Code:
if y >= ... and y <= ... then
  if x >= ... and x <= ... then
    ......
It's quite a mess.
Yeah it gets a bit long for multiple buttons. But on the other hand it is nice to have the overview when having large amounts of stuff going on under each button press, like changing button colours etc.
But if I was better at coding it was probably possible to store all the data from a button push in a variable and then execute everything afterwards, removing the need to have tons of lines inside the "button pushing check" function. Like here for example:
Code:
function checkClickPosition()
  if mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 5 then
    -- button HOT clicked
        monitor.setBackgroundColour((colours.lime))
        monitor.setCursorPos(1,5)
        monitor.write("  HOT  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,7)
        monitor.write(" WARM  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,9)
        monitor.write("NORMAL ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,11)
        monitor.write(" COLD  ")
        monitor.setBackgroundColour((colours.black))
        redstone.setBundledOutput("bottom", colours.white+colours.orange)
        sleep(1)
  elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 7 then
    -- button WARM clicked
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,5)
        monitor.write("  HOT  ")
        monitor.setBackgroundColour((colours.lime))
        monitor.setCursorPos(1,7)
        monitor.write(" WARM  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,9)
        monitor.write("NORMAL ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,11)
        monitor.write(" COLD  ")
        monitor.setBackgroundColour((colours.black))
        redstone.setBundledOutput("bottom",colours.white)
        sleep(1)
  elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 9 then
    -- button NORMAL clicked
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,5)
        monitor.write("  HOT  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,7)
        monitor.write(" WARM  ")
        monitor.setBackgroundColour((colours.lime))
        monitor.setCursorPos(1,9)
        monitor.write("NORMAL ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,11)
        monitor.write(" COLD  ")
        monitor.setBackgroundColour((colours.black))
        redstone.setBundledOutput("bottom",0)
        sleep(1)
  elseif mouseWidth > 1 and mouseWidth < 7 and mouseHeight == 11 then
    -- button NORMAL clicked
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,5)
        monitor.write("  HOT  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,7)
        monitor.write(" WARM  ")
        monitor.setBackgroundColour((colours.green))
        monitor.setCursorPos(1,9)
        monitor.write("NORMAL ")
        monitor.setBackgroundColour((colours.lime))
        monitor.setCursorPos(1,11)
        monitor.write(" COLD  ")
        monitor.setBackgroundColour((colours.black))
        redstone.setBundledOutput("bottom",colours.magenta)
        sleep(1)
  end
end

But on the other hand, this is really easy to put together with copy paste. Already written the buttons once. Just need to set up the if¨s(or cope from earlier code).
 

ljfa

New Member
Jul 29, 2019
2,761
-46
0
If you hardcode it like that you have to change multiple different source lines if you want to change a button's position or size or even color.
 

steve g

New Member
Jul 29, 2019
445
0
0
1) using a turtle to build an entire tree farm. base, water trap, glass walls, everything. then have the turtle manage the farm, scan for trees to fell as they grow, replant, etc.

2) using a computer to manage BigReactor turbine rpms (latest version allows for power coil control, letting the turbine spin up faster when coils are disengaged)

3) building a massive redstone contraption to hold data in a data storage system built using redpower/project red components, then using a computer to 'program' the system.

4) using a computer to 'train' a system for autocrafting using arcane pedestals, logistic pipes and peripheral proxies. place items on arcane pedestals in the pattern needed to show up on the crafting grid, hit button to 'train' the system, computer scans the items via proxy/logistics pipes, and records the item id's/locations into a table stored on disk. use stored table to run a system that can autocraft infusion altar items, arcane table recipes, etc. (almost had arcane table working. did get infusions to work tho ;) )

5) speaking of infusion altar...had a computer controlling a team of turtles via wireless comms, using the turtles to request items on the proper pedestals and scan the pedestals until the requested item showed up. once all turtles replied ok, then send a command to turtle on the runic matrix to start the infusion (toggle redstone signal to autonomous activator with a wand in it). parallel processing at its finest ;)
 
  • Like
Reactions: Shabazza

ThomazM

Phoenix Team Founder
Jun 11, 2013
1,308
2,514
473
The Immortal's Cemetery
When I first heard about it, I thougt: wow this must be super complicated, I can never figure out how to do it. But when I finally looked up how it worked... Basically just an if loop telling if the "click event" was within your set bounds :p

This is really good for explaining how it works(or just stealing the code from):

I really wish this video was called: "Touchscreen for Dummies"
 
  • Like
Reactions: rhn and pizzawolf14