Just for a note, I've read everything, that is available on wiki in terms of descriptions and guides, also watched guides on youtube, but I feel like I'm stuck with my learning project and I ask for help.
Recently I wanted to dig a little deeper in circuit network magic of a little more complex things, so I decided to create something slightly more complex than I usually did, specifically the accumulator display.
This post is not about me asking for a blueprint, I'm instead interested to understand how it works through building, so later I can built something else myself.
Here's list of requirements, I've put in front of myself (green - i did it, yellow - I did it, but it doesn't work perfectly, red - I'm stuck):
- Battery shaped lamp display with segments, representing charge, lightning up accordingly to charge percentage.
- Lighted up segments are painted to a specific color, based on charge (<=20% - red, <=40% - yellow, >40% - green), so at a single time whole battery is just displayed with one color.
- When exactly at 0% first segment will flash red.
- Battery border will blink, when charging or consuming charge.
- If its charging it blinks green, if it consumes the charge it will blink red.
- There's an indicator, that shows the lowest value overnight, that resets next time accums charge starts to go below 100.
Number 1 (final design)
Number 2 (test stand)
One more thing to note, I think I have an idea how to do it in terms of programming, the issue I'm having is I'm not 100% sure how to create specific things using circuit network itself.
Here's a list of my questions, that possibly someone can help me understand better:
- How to store a value, that will stay same, disregarding of the continious input value? Like, to let CN know that accums are losing charge, I can compare A and B, where A is current charge level and B is a charge level lets say a second ago. If A<B - it is loosing charge. I tried SR latches and memory cells from tutorials on wiki, but my B is always equal to A as it changes overnight.
- How to force pulse machine to stop outputting the value if the initial condition is not met on first decider combinator? Please see the blueprint Number 2 for it - on the right a have a solution that forces lowest row of lamps to blink, if A(ccumulator charge)=0. It does so, but if A will raise above 0, when the pulse had negative value - it will continue to output that negative value, which will cause the lamps to be disabled due to enabled condition for A be greater or equal than 0 to light.
This design, I've found on reddit seems to work, but its such a compact mess of combinators and wires, I'm just banging my head against the wall, trying to understand how it works.