Issues with Turtle not regulating power of Magmatic Dynamos

  • 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

Benie76

New Member
Jul 29, 2019
141
0
0
Pack: Direwolf20 1.3.1

So, my friend has a turtle that sits infront of a Capacitor Bank, and has it regulate the use of the Magmatic Dynamos. He also gave me the code so I can do it too.
Well.. he's offline right now and can't really help me, and I'm having issues with it. See, he has it set where the Dynamos don't turn on until the battery is drained to 10%, then stay on until past 90%. It's not for me. And I think it has to do with my current setup.

See, I have an Ender Tank full of lava with the Magmatic Dynamos right next to it on both sides, then having Enhanced Energy Conduits from EnderIO send the power into the bottom of the capacitor, with the turtle on the other side.
Here's my power setup;
http://puu.sh/hTRyb/4af6500177.jpg
http://puu.sh/hTRwK/82931274a7.jpg
(The Capacitor Bank is a Basic bank. Both of them)

This is the code he used;
http://pastebin.com/w7ibbKfD

If someone could look at my setup (and his code) and see what is wrong here, that would be great. I'm also a complete n00b at ComputerCraft. Currently I'm having to manually regulate the power via a lever and redstone. And it would be nice if this was automatic (and actually worked).
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
Does it give an error?
What are the values it print(also say what it should print/the amount of rf stored and max energy that it can store)?
I take that you made sure that the redstone control on the engines is correctly setup?
the redstone is connected correctly?
does the redstone light up/show that it works?
 

Benie76

New Member
Jul 29, 2019
141
0
0
Does it give an error?: No
Values: It doesn't even tell me. Infact it doesn't show the prompt. All I see is "CraftOS 1.7" and that's it. That's after rebooting it.
Redstone Control on engines: Yes. They're both set to only turn on when a High signal is given.
Redstone light up: No. The dynamos aren't turning on.
 

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
did you name the script startup?
if no, let me guess you can also type in the turtle?

if both of these are the case name it startup and reboot the turtle by holding ctr+r for a few seconds
edit and I derped I didn't see that the prints where commented out, can you remove the -- before all the prints?
 
Last edited:

Benie76

New Member
Jul 29, 2019
141
0
0
I'm not sure what you mean by "script startup". All I did was use 'pastebin get w7ibbKfD local capacitor', and that worked. It said 'Downloaded as local'.
Then I did a reboot, and nothing's happening. It's not sending a signal.

I did a clone of the paste without the '--''s behind the prints. Here's the new one;
http://pastebin.com/GkRW3RxM

After deleting the last one (the program in the Turtle) and putting this in, it's spamming the following;
'0 < 0.9 == true'
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
if you name a script startup it runs automatically when the turtle/computer starts.

When looking at the code and what it spams it looks like it is stuck in the second while loop, this one to be exact
Code:
    while power_less(endLimit) do
        sleep(1)
    end
however I am currently not able to debug it for you. You can test it by putting print("stuck at while") under the sleep(1) so that it looks like this
Code:
    while power_less(endLimit) do
        sleep(1)
        print("stuck at while")
    end
 

Benie76

New Member
Jul 29, 2019
141
0
0
Used the code you gave me, and now I'm seeing this;

'stuck at while
0 < 0.9 == true'

What looks like to me, and I'm no expert on coding so this is going to sound plainly obvious, it's stuck in 'sleep' mode. It is reading the power, yet it's not sending a signal. I'm not even sure how it's going to, with the way I got the conduits setup like that.
My other guess is, Enhanced Energy Conduits don't respond to Redstone signals. I would have to have Redstone conduits, I guess.
 
Last edited:

lenscas

Over-Achiever
Jul 31, 2013
2,015
1,801
248
yes, that means that it is stuck at the while I already taught it was. For some reason it reads that it has 0 rf this is obviously less then 90% and thus it just waits.
 

Benie76

New Member
Jul 29, 2019
141
0
0
I tried to use Insulated Redstone Energy Conduits as a test. No go. All I know is my friend told me to "put the Turtle on the bottom".
I have still wondered if it could be my configuration. Like I'm supposed to have the power source on the top, and the cable that goes to my machines (and everything else in my base) on the bottom.

EDIT: I think I got it. I tried to run Insulated Redstone Conduits from the bottom of the Turtle and wire them to the Dynamos. Soon as I did, they turned on. They charged the bank until it hit nearly 2 million, and then turned off.
Testing some more to see if they come back on after purposely draining the bank of its power. If they do, then this is what my friend meant.

EDIT2: Testing passed. I definitely got it. Thanks all.
 
Last edited:

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
Just a curious question: Why exactly a turtle? What is wrong with a computer? :p
 
  • Like
Reactions: KingTriaxx

Benie76

New Member
Jul 29, 2019
141
0
0
Or failing those, why not an EnderIO Power Monitor? That can do it natively.
My friend uses a Turtle, and I'm just basically doing what my friend is. And he probably has a reason why he didn't.
He knows more about EnderIO and these things than I do. And maybe he felt that the Power Monitor wasn't going to support his setup, or something. He's not on right now for me to ask.
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
My friend uses a Turtle, and I'm just basically doing what my friend is. And he probably has a reason why he didn't.
He knows more about EnderIO and these things than I do. And maybe he felt that the Power Monitor wasn't going to support his setup, or something. He's not on right now for me to ask.
Well there is absolutely no reason at all to use a Turtle. A normal CC Computer would have been enough(and probably preferable as turtles are vulnerable to various bugs, like completely resetting etc.). The reason you use turtles is to have them move around, break/place blocks and interact with inventories etc. There is no such need in this case. So you might as well run the script on a normal, cheaper Computer.

And the Power Monitor does exactly what the script does and more: It allows you to set an upper and lower percentage and it will then output a redstone signal based on those percentages(On when dropping below minimum, off when above maximum).
http://wiki.enderio.com/Power_Monitor
 

KingTriaxx

Forum Addict
Jul 27, 2013
4,266
1,333
184
Michigan
I wonder if perhaps its the issue of two banks being two separate blocks to a computer? I know I remember Dire running into that issue, though it might have been fixed.