Hi,
with 0.13 out it is fairly easy to make an item counter. Just connect your inserter/belt to a arithmetic combinator and wire the result back in (e.g. A + iron plates = A). But how do I reset the counter?
For example i would like to count 2 Iron Plates, wait till a trigger condition is met (so reset the counter), and than count another 2 Iron plates. Any ideas?
How to reset a counter?
Re: How to reset a counter?
Only way that I have tried is to wire in an arithmetic combinator gives the negative of the current value, i.e. (A * -1 => A), then wire that back into your (A + iron plates => A) input. But then, you only want that to happen for a single tick, so you really want (A * B => A) where B pulses to -1 for a single tick on your trigger condition.
-
- Fast Inserter
- Posts: 230
- Joined: Wed Jun 08, 2016 6:16 pm
- Contact:
Re: How to reset a counter?
Since the network adds by itself I usually do iron * green = iron and then just dump in the iron on another wire, and then just remove green to reset.
Re: How to reset a counter?
I use a decider combinator looped to itself, red=0, return everything. Every pulse gets counted, and it resets with a red signal.
-
- Fast Inserter
- Posts: 230
- Joined: Wed Jun 08, 2016 6:16 pm
- Contact:
Re: How to reset a counter?
I never thought about that, and it would simplify alot of my stuff since the reset is 1 instead of 0. thx 
