Hello guys,
I need some help with a lamp indicator.
I have a 10 light setup like this
XXXXX
XXXXX
I want to show light based on workload ( 0 - 100% )
0 % = all lights green flashing in a wave
example
XXXXX XXXXX etc
XXXXX XXXXX etc
1-50% = teal where every lamp represents 5%
example
25% workload
(the last activated lamp should flash on and off)
XXXXX
XXXXX
51-99% = purple
example 75%
(the last activated lamp should flash on and off)
XXXXX
XXXXX
100% = all lights flash red like in example 1
XXXXX XXXXX
XXXXX XXXXX
Can someone help me?
Need help with lamp indicator
-
- Fast Inserter
- Posts: 187
- Joined: Fri Jan 05, 2018 5:18 pm
- Contact:
Re: Need help with lamp indicator
This sounds overly complicated, but at a high level you can break it down into several component parts and combine them all into one giant circuit. For example, you start with a chain of deciders which check if the value is 0, <= 10, <= 20, ..., <= 90, < 100, 100.
Then you can build a circuit which makes all of the lights flashing green. To do this, you make a clock which cycles I guess every 30 ticks connected to an adder which cycles between 0 and 9. Then you have a sequence of 10 deciders which output green if and only if the 0% decider from above is active and the timer is currently at 0 for the first light, 1 for the second light, etc. up to 9 for the last light. Then you connect these 10 deciders to the lights.
The exact same thing should work for 100% to make it red.
Your example initially says 10 lights but then you start talking about 5% increments and have 20 lights, so you might need a chain of 20 deciders instead of just 10.
For the 1% to 50% band, you have another sequence of deciders for each light which outputs cyan if and only if the value is high enough that you want that particular light to be on. You can connect it to the previous adder which cycles between 0 and 9 to test for even and make it blink twice per second if you want blinking as well.
All told I think this is too much work. I put a similar sequence of lights on one of my supply trains to give me a quick visual indication of how busy that train is, and I was more than satisfied just to see which 10% band it was in without the extra blinking that you are asking for.
Then you can build a circuit which makes all of the lights flashing green. To do this, you make a clock which cycles I guess every 30 ticks connected to an adder which cycles between 0 and 9. Then you have a sequence of 10 deciders which output green if and only if the 0% decider from above is active and the timer is currently at 0 for the first light, 1 for the second light, etc. up to 9 for the last light. Then you connect these 10 deciders to the lights.
The exact same thing should work for 100% to make it red.
Your example initially says 10 lights but then you start talking about 5% increments and have 20 lights, so you might need a chain of 20 deciders instead of just 10.
For the 1% to 50% band, you have another sequence of deciders for each light which outputs cyan if and only if the value is high enough that you want that particular light to be on. You can connect it to the previous adder which cycles between 0 and 9 to test for even and make it blink twice per second if you want blinking as well.
All told I think this is too much work. I put a similar sequence of lights on one of my supply trains to give me a quick visual indication of how busy that train is, and I was more than satisfied just to see which 10% band it was in without the extra blinking that you are asking for.
Re: Need help with lamp indicator
i do this setup for the same thing you used. to indicate how busy my supply train is. This almost sounds like my idea which i posted in the past has spread arround.
i need 12 + 2 combinators for the green and red flashing including alarm
i made the teal part with 1 combinator
but for the purple i need 11 combinators and i didnt find a way to make it more compact
this is 26 combinators in total right now without the teal and purple flashing
Btw the flashing just needs 4 + 2 combinators (2 for both colors) i used 12 + 2 to make it flash from left to right and back from right to left
i need 12 + 2 combinators for the green and red flashing including alarm
i made the teal part with 1 combinator
but for the purple i need 11 combinators and i didnt find a way to make it more compact
this is 26 combinators in total right now without the teal and purple flashing
Btw the flashing just needs 4 + 2 combinators (2 for both colors) i used 12 + 2 to make it flash from left to right and back from right to left