Page 1 of 1

Seven Segment Display 0-9 w/bstring

Posted: Wed Aug 12, 2015 5:12 am
by chapium
I made a little SSD in facotorio :geek: It can show numbers 0-9 based on input from the network. Just replace the constant combinator with your input and adjust the / combinator to index your data to numbers 0-9.

I'm sure further optimization may be possible, but in its current state it simply works.

Image

Code: Select all

H4sIAAAAAAAA/81bf2+jOBD9KhV/kx62ISTqcdJ2f3yJ1Smi4HQtEUAETltF+e4HSdqtTXA8Zkjy37Ih4HnPM/PexE2Lh6xI4uxhFe14Xota8G202+XxhkdO
yhOR8mqWFJsXkcd1UTluWWzbm4o82v2OPPctmgWPwd5NRcWTw39TNyny/HjRPumnQ5x/o13F0/aphxe8rUQazffup6uFm4gqaUTdXZD9fu/+dGj3tdeK81z6
onQr3Xf3tu9Lxel1pxVHu7WotvVqK17zOIt29VvZhvOfqOomzhz3GN3xwxlxDo/Y1nFeR6T956aMqy7WyPnbcYumLhuzB305PKh8WyVFk9erdVVsViJvvx05
6zjbcqdbrCGyzBrZpTmWy2mxDEZg+YyI5dwaS+KZgynfi48mHYHmVwCa202cZbMs3pQyirPFY9AByTogz4HXhySQknzeg+SEFwSSL58h8SRI/jGKYgmOwpei
IOSaYbyI1xnP2jVWIpmVRcaVaPwuFv98JL3NLO9lKai5snfdizCEvd1unI/eBwHQfFxoQgite8iFuFCzmElcRzfrLwcOfKuaOMwBgIJQQ8E16+jtGGDWDFBN
FgC6P9VQ4Gk+m1g1zJVqeFPVYMUPG+aHAgQFG+ZgYgroCApQpAbxjl2a2moN0gfFokv/GCs23uMg5nEQZcOwuwgkhMch6wXqY8TxjBQHYF8RFAJMF/5+z2BV
6irSBxNrkdW86uy6vIZ11oj0fQUlr6tWODab2Wu8PSyj6VI88DxX5Cn/faxCp/fHlah/bXjdqs3hFXwgCJYOwaeC158IqDj/Wcx5qC+E+V7MAs8tSt6i3S3U
+QtUzYgDFrZWyITmLV3KKsDgRKO45pqH4ncXf0R3QRdgxGofayhhkJHBcpgTdtVxAkwGf8dmwa6aANzgoHiyl2dE4yI1vNKJefXuhNe5Pa+eZTEkSJk3sQEd
M2L+gc2QVf1T00RCjw6x0LNJPb6mHLXA+sxhxyA6Gc9ccLaKX8ITRTh/RxqbAuIgSt2jE/iBl6zhYyNbgCNTGCLyJQ3uJbIQvPVkz8ZCjEi+mobRvLT3dO85
4zcITIR7VlVNoycYZK6mEQbsqpMbWPf/hj1etmNBZ4UAA2aqmzBPPOQfo8EwWWC2qaCamM/g+ZARpmaO7PvTkrC4EyHMrFNBZ3AopCBpxK7qYqad5t/WjtjV
I6Kp5lQFT0OCLhXwHccfAXvWdcDUMLrrQGDils4iHOHgwM5iQBYRT5ZFlxwIYHSvSHWGcnBjtAM56nTA5J7NJ1Cz33CMFCSMYAI/ODqMELqplDBwXJKptzCR
q1azKtUXSFWdAYSSpkX7bNoWHYxo0diewW4cpbEMDPALCdMYN9VO3NO5IGzLYJUJqiAd1jfKZ4FpV5cNA35XH6OQoF3dRCVZ5QLInU086A5HAIopObvCYnWQ
B1LB1Sot7XH1eOUdAY1dwa3OdapVWgJv8AeFMyRozrSp1f2enC52Bbfb7TqHGgCcrk7L4GcCqtP9GLvjcWGVEGoZH8bwlh3zmj7YBGqrv/EYFiBn6ouv2dq9
YdD9FHnDbb13RXJY6+50MswdxL4N/XgPdXtOsX3QU8XrpsofVk88T/8HTNZwiWM2AAA=

Re: Seven Segment Display 0-9 w/bstring

Posted: Thu Aug 13, 2015 12:28 pm
by @xi@g@me
Nice idea :)

I didn't get your blueprint, but seeing the screenshot I guess you used pure logic to determine which segment to light (each block of deciders send a given signal if the number is equal to certain values).
There is another way of doing so, which may not be more optimized with a single digit, but may be with two or more.

Constant combinators can send different signals alone. So for example you can create a constant combinator for each digit from 0 to 9, outputing signals that light the LEDs you want.
Then you create 10 decider combinators linked to your input, each of them outputting 1 unit of a given signal if the input equals the given number (I mean if "input" = 0, if "input" = 1, etc.)

And at the end, you can put multipliers combinators to act as an "and" logic door (multiply each by the decider combinatour output signal).

With only digit it would cost you 30 combinators instead of 27 in your plan, but for each new digit it would cost you only 20 combinators, as you don't need to replicate the constant ones :)
The other advantage is that you can control more complex displays than seven segments ones.

For example, the one I described here looks like a seven-segment displays, but it actually works with 13 different signals ! Since each corner needs another type of signal than the segments. And with the above mentionned method, you just need to output more signals from the constant combinators, without altering the rest of the circuit :)

Re: Seven Segment Display 0-9 w/bstring

Posted: Thu Aug 13, 2015 8:09 pm
by XKnight
I think my duty is to share this link with you:
https://forums.factorio.com/forum/vie ... =8&t=14150.
Because it looks like you did not see it before.

Re: Seven Segment Display 0-9 w/bstring

Posted: Fri Aug 14, 2015 1:09 pm
by chapium
I'll need to take a look a that, he really reduced the number of combinators. The design of mine is 7 groups each defining the range of choices using <, >, =, and and or gates.

Re: Seven Segment Display 0-9 w/bstring

Posted: Fri Aug 14, 2015 8:47 pm
by @xi@g@me
Yes, his design is really clever (although the manner it is presented in this topic does not really please me, whatever)

So I was right in my guess of how you used the combinators, this is the first thing I wanted to do too, but I was stuck due to the fact I was troubled by the fact the signals follow every cable, even when it goes back to an output. At the moment I understood I could use several signals, I also found it would be more clever to use constant combinators to put every signal I needed for each digit (this is what XKnight does too, if I understood well what he said in the topic).

Now that I found some interesting things in the manner of how signals work, I think I would be able to have a better result too. If I get something better, I'll tell you how I did that.