Posted 15 March 2012 - 03:37 PM
Hi @all,
yesterday I build some 7 Segment Displays (total 4), now i had a problem, with controlling them.
I got to Bundled Buses out of the Computer to the segments, but I am not the lua Pro :D/>/>
Maybe somebody of you can help me.
I need a Program where I can enter a 4 Digit Number an the Computer will make the Segments light.
I thought a bit about that and got these code lines, who tells me which colors I must turn on to display the entered number.
a0 to b9 are on side right, c0 to d9 are on side top
(a0 stands vor segment a, number 0)
Now I want a program where i can enter 1234 in the Computer and the Computer will switch it so that the four 7 segment Displays display 1234.
(at Programm startup it should set all outputs to off)
I hope you understand me, and sorry for my bad english,
I'm Austrian.
Thanks in advance!
Haidy777
Edit: I use CC 1.3 on MC 1.1
yesterday I build some 7 Segment Displays (total 4), now i had a problem, with controlling them.
I got to Bundled Buses out of the Computer to the segments, but I am not the lua Pro :D/>/>
Maybe somebody of you can help me.
I need a Program where I can enter a 4 Digit Number an the Computer will make the Segments light.
I thought a bit about that and got these code lines, who tells me which colors I must turn on to display the entered number.
a0 to b9 are on side right, c0 to d9 are on side top
(a0 stands vor segment a, number 0)
a0 = colors.combine(colors.white, colors.black, colors.gray, colors.blue, colors.magenta, colors.lightBlue)--100,101,102,104,105,106
a1 = colors.combine(colors.black, colors.magenta)--101,105
a2 = colors.combine(colors.white, colors.black, colors.purple, colors.blue, colors.lightBlue)--100,101,103,104,106
a3 = colors.combine(colors.white, colors.black, colors.purple, colors.magenta, colors.lightBlue)--100,101,103,105,106
a4 = colors.combine(colors.black, colors.gray, colors.purple, colors.magenta)--101,102,103,105
a5 = colors.combine(colors.white, colors.gray, colors.purple, colors.magenta, colors.lightBlue)--100,102,103,105,106
a6 = colors.combine(colors.white, colors.gray, colors.purple, colors.blue, colors.magenta, colors.lightBlue)--100,102,103,104,105,106
a7 = colors.combine(colors.white, colors.black, colors.magenta)--100,101,105
a8 = colors.combine(colors.white, colors.black, colors.gray, colors.purple, colors.blue, colors.magenta, colors.lightBlue)--100,101,102,103,104,105,106
a9 = colors.combine(colors.white, colors.black, colors.gray, colors.magenta, colors.lightBlue, colors.purple)--100,101,102,103,105,106
b0 = colors.combine(colors.yellow, colors.orange, colors.green, colors.red, colors.pink, colors.lime)--107,108,109,111,112,113
b1 = colors.combine(colors.orange, colors.red)--108,111
b2 = colors.combine(colors.yellow, colors.green, colors.cyan, colors.pink, colors.lime)--107,109,110,112,113
b3 = colors.combine(colors.yellow, colors.orange, colors.cyan, colors.red, colors.lime)--107,108,110,111,113
b4 = colors.combine(colors.orange, colors.green, colos.cyan, colors.red)--108,109,110,111
b5 = colors.combine(colors.yellow, colors.green, colors.cyan, colors.red, colors.lime)--107,109,110,111,113
b6 = colors.combine(colors.yellow, colors.green, colors.cyan, colors.red, colors.pink, colors.lime)--107,109,110,111,112,113
b7 = colors.combine(colors.yellow, colors.orange, colors.red)--107,108,111
b8 = colors.combine(colors.yellow, colors.orange, colors.green, colors.cyan, colors.red, colors.pink, colors.lime)--107,108,109,110,111,112,113
b9 = colors.combine(colors.yellow, colors.orange, colors.green, colors.cyan, colors.red, colors.lime)--107,108,109,110,111,113
c0 = colors.combine(colors.lightGray, colors.white, colors.black, colors.purple, colors.blue,colors.magenta)--114,115,116,118,119,120
c1 = colors.combine(colors.white, colors.purple)--115,118
c2 = colors.combine(colors.lightGray, colors.white, colors.gray, colors.blue, colors.magenta)--114,115,117,119,120
c3 = colors.combine(colors.lightGray, colors.white, colors.gray, colors.purple, colors.magenta)--114,115,117,118,120
c4 = colors.combine(colors.white, colors.black, colors.gray, colors.purple)--115,116,117,118
c5 = colors.combine(colors.lightGray, colors.black, colors.gray, colors.purple, colors.magenta)--114,116,117,118,120
c6 = colors.combine(colors.lightGray, colors.black, colors.gray, colors.purple, colors.blue, magenta)--114,116,117,118,119,120
c7 = colors.combine(colors.lightGray, colors.white, colors.purple,)--114,115,118
c8 = colors.combine(colors.lightGray, colors.white, colors.black, colors.gray, colors.purple, colors.blue, colors.magenta)--114,115,116,117,118,119,120
c9 = colors.combine(colors.lightGray, colors.white, colors.black, colors.gray, colors.purple, colors.magenta)--114,115,116,117,118,120
d0 = colors.combine(colors.lightBlue, colors.yellow, colors.orange, colors.cyan, colors.red, colors.pink)--121,122,123,125,126,127
d1 = colors.combine(colors.yellow, colors.cyan)--122,125
d2 = colors.combine(colors.lightBlue, colors.yellow, colors.green, colors.red, colors.pink)--121,122,124,126,127
d3 = colors.combine(colors.lightBlue, colors.yellow, colors.green, colors.cyan, colors.pink)--121,122,124,125,127
d4 = colors.combine(colors.yellow, colors.orange, colors.green, colors.cyan)--122,123,124,125
d5 = colors.combine(colors.lightBlue, colors.orange, colors.green, colors.cyan, colors.pink)--121,123,124,125,127
d6 = colors.combine(colors.lightBlue, colors.orange, colors.green, colors.cyan, colors.red, colors.pink)--121,123,124,125,126,127
d7 = colors.combine(colors.lightBlue, colors.yellow, colors.cyan)--121,122,125
d8 = colors.combine(colors.lightBlue, colors.yellow, colors.orange, colors.green, colors.cyan, colors.red, colors.pink)--121,122,123,124,125,126,127
d9 = colors.combine(colors.lightBlue, colors.yellow, colors.orange, colors.green, colors.cyan, colors.pink)--121,122,123,124,125,127
Now I want a program where i can enter 1234 in the Computer and the Computer will switch it so that the four 7 segment Displays display 1234.
(at Programm startup it should set all outputs to off)
I hope you understand me, and sorry for my bad english,
I'm Austrian.
Thanks in advance!
Haidy777
Edit: I use CC 1.3 on MC 1.1
Edited on 16 March 2012 - 06:30 PM