-1

Hello

sorry, my english is bad :|

I want to write a program to convert text to hex code for led moving sign

How do I scan text in the text box pixel by pixel and get its hex code.

The only way is to my mind is that I convert text to image then I scan image and find it's on and off points.

What is your suggestion ? Is there an easier way?How to convert text to image?

NOTE: I want this program to be responsive for all sizes

this is an example for this program

hex code of 'test' in 32*16

const unsigned char Code[]=
{

0x00,0x20,  //  X=32

0x00,0x10,  //  Y=16

0x00,0x10,  //  ...........#....

0x00,0x10,  //  ...........#....

0x00,0x10,  //  ...........#....

0x1F,0xF0,  //  ...#########....

0x00,0x10,  //  ...........#....

0x00,0x10,  //  ...........#....

0x00,0x10,  //  ...........#....

0x00,0x00,  //  ................

0x0F,0x80,  //  ....#####.......

0x12,0x40,  //  ...#..#..#......

0x12,0x40,  //  ...#..#..#......

0x12,0x40,  //  ...#..#..#......

0x12,0x40,  //  ...#..#..#......

0x0B,0x80,  //  ....#.###.......

0x00,0x00,  //  ................

0x09,0x80,  //  ....#..##.......

0x12,0x40,  //  ...#..#..#......

0x12,0x40,  //  ...#..#..#......

0x12,0x40,  //  ...#..#..#......

0x0C,0x80,  //  ....##..#.......

0x00,0x00,  //  ................

0x00,0x40,  //  .........#......

0x0F,0xF0,  //  ....########....

0x10,0x40,  //  ...#.....#......

0x10,0x40,  //  ...#.....#......

0x00,0x00,  //  ................

0x00,0x00,  //  ................

0x00,0x00,  //  ................

0x00,0x00,  //  ................

0x00,0x00,  //  ................

0x00,0x00,  //  ................

0x00,0x00   //  ................

};
Hussain Ali
  • 53
  • 1
  • 6
  • 1
    Could you provide some *examples*? E.g. if text is `"bla-bla"` what's the corresponding hex code for it? If you have the text in the `TextBox` it doesn't seem to me that you have to work with *pixels* – Dmitry Bychenko Apr 14 '16 at 13:20
  • 1
    googling would help you start, http://stackoverflow.com/questions/8613348/vb-net-led-board-display-user-control http://www.vbforums.com/showthread.php?750331-How-to-Display-Images-in-LED-Display-Board http://www.dreamincode.net/forums/topic/203335-led-display-communication/ – Claudius Apr 14 '16 at 13:23

1 Answers1

0

To get you going:

string test = "abc123"; foreach (var character in test) string.Format("{0:X}", (int)character);