-1

I am designing an APP where user will input a text like("I love to be fooled"). This text then will display in a Window like Electronic LED Display board. And it will obviously moving. For this I have to do

  1. design a window which will have 16(row) * 64(column) LED. visually. but how?
  2. i will make a text file which will contain data's like (f00f-offo-ffoo-3051(suppose for I, hex value),2340-foof-oooo-fofo(suppose for l)and .....)
  3. then i have to shift them with time from left to write like a real world LED display. but how?

I prefer to use winform

please any of your idea will be great for me.

Thanks, A. Rahim

Abdur Rahim
  • 3,975
  • 14
  • 44
  • 83

1 Answers1

3

The way to approach this is to have a 6 x 5 array for each character of the alphabet, like:

int[][] letterA = { { 0, 0, 1, 1, 0, 0 },
                    { 0, 1, 0, 0, 1, 0 },
                    { 1, 1, 0, 0, 1, 1 },
                    { 1, 1, 1, 1, 1, 1 },
                    { 1, 1, 1, 1, 1, 1 },
                    { 1, 1, 0, 0, 1, 1 },
                    { 1, 1, 0, 0, 1, 1 }};

You then would merge the letters needed to build the typed in word.

So each line becomes longer with the leds needed to be on.

So thats the business logic for the app.

You now want to create a finitie LED light set, so say 60 x 10 and start from the far right and if the current array value is 1 then display the circle yellow otherwise black.

Hope that helps.

Edit: Programmatically render circles on the form.

You could create a timer than removed all controls within a panel and then you could do:

//word is the merged array of letters like the one above
foreach(int[] line in word)
{
    //currentShiftIndex is the shift amount to render control from left to right
    int currentShiftIndex = 1;
    foreach(int i in line)
    {
        //set up a control called 'light' for example [im not including that]
        light.Left = currentShiftIndex * 10;
        light.Background = i == 1 ? "Yellow" : "Black"
    }
}

Thats purely an example of rendering one line. Ignore any wrong syntax. Im purely just giving an example on the process of this.

I hope that helps.

Base33
  • 3,167
  • 2
  • 27
  • 31
  • @decoyer If Base33's answer is helpful then you should click the up arrow to the top-left. You should also accept answers to your questions if they are suitable. – Ozzah Mar 28 '12 at 22:23
  • @Ozzah i dont have reputation greater than 15. And how could i accept this? Thanks. – Abdur Rahim Mar 29 '12 at 07:00