[0.12] - tank contents display
Posted: Wed Aug 12, 2015 7:28 pm
This time, a more useful thing than the micro machines track
Following a bet, I did some experiment and managed to create a percentage counter telling how much petroleum gas is in the storage
First image was an initial try, with 2 lines, one showing the tens, and one the units
Here it displays 31%
For exemple if you want the tens and units of "27", you can divide 27 by ten, and then multiply by ten. You get : 27 / 10 = 2, and 2 * 10 = 20. And then 27 - 20 gives you seven.
This technique is also used for the 2 lines display.
After that, the two first lines of deciders are just to see if the digit equals 0, 1, 2, etc. when the digit equals the desired value, 1 is outputed.
The third and fourth lines are series of constant units, otuput signals of type 1 to D, needed to turn the lights we want on to create the desired number.
Normally I would need only a single array of constant units, but the red cables were to short to connect them everywhere. So instead of putting 10 eletric poles in the middle, I just doubbled the layout, it's more presentable
The last lines are multiplier units. I use them to multiply each output of the constant units with the output of the first line with the output of the "=" deciders. This gives a logical "and" behavior.
And after that, each output is connected to the lights, and each light is programmed to light if the desired signal is received (1 to D)
P.S. the spoilers frames cut the images, do right click + show image to see the full image
Following a bet, I did some experiment and managed to create a percentage counter telling how much petroleum gas is in the storage
First image was an initial try, with 2 lines, one showing the tens, and one the units
Here it displays 31%
Display 2 lines
The second is a bit more advanced (the bet goal) and show the percentage with 2 floating point digits precision using "7-segment" displaysDisplay percentage
What you see on top of the images are the deciders I use to compute each digit from 0 to 9. This is easily done by dividing and multipling again, so with precision loss you can get what has been removed from the initial number.For exemple if you want the tens and units of "27", you can divide 27 by ten, and then multiply by ten. You get : 27 / 10 = 2, and 2 * 10 = 20. And then 27 - 20 gives you seven.
This technique is also used for the 2 lines display.
After that, the two first lines of deciders are just to see if the digit equals 0, 1, 2, etc. when the digit equals the desired value, 1 is outputed.
The third and fourth lines are series of constant units, otuput signals of type 1 to D, needed to turn the lights we want on to create the desired number.
Normally I would need only a single array of constant units, but the red cables were to short to connect them everywhere. So instead of putting 10 eletric poles in the middle, I just doubbled the layout, it's more presentable
The last lines are multiplier units. I use them to multiply each output of the constant units with the output of the first line with the output of the "=" deciders. This gives a logical "and" behavior.
And after that, each output is connected to the lights, and each light is programmed to light if the desired signal is received (1 to D)
P.S. the spoilers frames cut the images, do right click + show image to see the full image