05-12-2011 04:07 PM
I want to assign a letter (either A B C D E F or G) to specific numbers from 0-65. for example I want to type in a number from 0-65 into a control, and then have the corresponding Letter show in the indicator. How do I do this?
Solved! Go to Solution.
05-12-2011 04:15 PM - edited 05-12-2011 04:17 PM
Make a small lookup table (array of single character strings with the index corresponding to the input.)
What exactly are the 66 letters you want and in what order? What should be returned for out of range inputs?
(A simple U8 add constant then typecast won't work that well because the letters are not contiguous in the ASCII table)
05-12-2011 04:23 PM
the numbers represent LED markers that are used in a motion analysis system. the Letters A,B,C,D,E,F,G correspond to ID given to each marker. so depending on where the marker is on the body correlates with the Letter that is assigned to it. I am trying to write a program that will tell you the Letter ID based on the marker you are looking for.
05-16-2011 02:53 PM
Change the 'magic' string to meet your needs, i.e. 'AXXXXXXXXBXXXXXXXXCXXXXDXXXXEFXXXXG' ... now B=10, etc..
this works as long as each letter maps to exactly one number.
05-16-2011 04:01 PM
works great thanks so much!