Need timer help

  • 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

genwedar

New Member
Jul 29, 2019
1
0
0
I need to make a timer that can output once every 90 seconds to 6 different rednet (or ender io redstone conduit) channels with a pulse staggered by about 15 seconds on each.

So it would actually be pulsing once every 15 seconds but only once every 90 seconds on each individual channel. I need the pulse to be strong output for around 2.0 seconds.

I have no idea how to accomplish this.
 

zemerick

New Member
Jul 29, 2019
667
0
1
Computercraft would definitely be the easiest solution.

I haven't touched it in quite awhile, so I can't give you any actual code. Basically though, you set up a loop with a 15 (or 13 if you include the 2 seconds in it.) second delay. A variable increments each loop, and controls the channel for the output which is set to 2 seconds. Once the variable gets to 6, reset it to 1 ( or 5/0 as needed by the code. )
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
Yeah, ComputerCraft would be the simplest way by far. However, it should also be doable using the Programmable Rednet Controller in the same amount of space (although I have no clue how you'd need to program it) or in much more space (but with no code) with a dozen State Cells (ProjectRed has them for sure, and BluePower probably has something similar).

When you look at a state cell in-world, you'll notice that it has two input sides and two output sides. I'll refer to the output that the pointer points to by default as the "front output", even though it faces to the side when you place it, and to the other output as the side output. To my understanding, the two inputs work the same way.

When you sent a pulse to either input, the front output turns on briefly (the time is set in the timer's GUI), and when that output turns off, the other output turns on for a tick or two. So, if you put a bunch of them side by side and send a pulse to the one at the end (the left end by default; note that you can flip the cells by shift-clicking them with a screwdriver), each will trigger the next one when its front output turns off. So, if you set each to a 15-second delay and wire the sixth one back to the first (or have the leftmost state cell be triggered by a 90-second Timer), a 15-second-long pulse will cycle through all six state cells.

However, that's not quite what you're trying to do. The simplest way to make each pulse last only two seconds would be to use six more state cells. If you put another state cell directly in front of one of the first six and set if to two seconds, it should shorten the 15-second pulse to two seconds. However, if you place 2-second state cells directly in front of all the 15-second cells, they'll all trigger each other and cause all sorts of chaos. However, if you move every other one forward a block, away from the 15-second cells, and fill the gaps with red alloy wire with a microblock strip (or cover) on either side, it should work just fine.