This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cthonia's profile picture

Turtle redstone emit problem

Started by Cthonia, 16 August 2016 - 11:32 AM
Cthonia #1
Posted 16 August 2016 - 01:32 PM
Hello fellow code-dwellers,

I am somewhat noob concerning coding but determined to get the hang of it. I play on ftb ultimate and made a semi-automatic redwood farm (note: I play on the 1.4.7 ftb ultimate since my rig can't handle better so if the old version is the issue I leave it be) My turtle handles the felling with the while turtle.detectUp/Down() do loops.
I am aware the turtle can compare blocks to know it's the tree or the soil, but I'd like to my turtle emit a redstone signal so the pistons (supporting the soil from which the tree grows) retract. This leaves a single layer of air beneath the tree so my program recognize where to stop. I've read the redstone API wiki page and used the rs.setOutput("back",true) command but it does nothing, however if I use the same in the lua interface it emits redstone. It's a standard felling turtle, first I tried to emit on the left side, but I found a topic where they said on the sides which have peripherials installed, no redstone emitting is possible. So I changed the code to use the backside of the turtle, but nothing happened.
Any help appreciated, but don't forget it's an old version we talk about.

Cthonia
Bomb Bloke #2
Posted 16 August 2016 - 02:02 PM
Given that it works in the Lua console but not in your script, it may pay to provide a copy of the script's code.
Cthonia #3
Posted 16 August 2016 - 02:06 PM
Problem solved. The cause was the fast deactivation, the rs.setOutput("back",true) were followed imediately by a rs.setOutput("back",false) to avoid the active turtle scrambling my wiring. This also deactivated the signal so fast it didn't even form a true pulse. Writing a sleep(1) between solved the problem.