Just some kind of if statement perhaps, if an a is received, make the string to be used = 1001. If what arrives is a b, string to be used = 1100 or whatever.
Or switch...case.
Just some kind of if statement perhaps, if an a is received, make the string to be used = 1001. If what arrives is a b, string to be used = 1100 or whatever.
Or switch...case.