char cmd1[1]="";
Why a one element array? What's wrong with
char cmd1;
if (in_char == 0x2f)
while(in_char != 0x0D)
while(in_char != 0x0D){
if (in_char == 0x5C)
Drat. Left me cheat sheet at home. What's a 0x2f? There is no key on my keyboard with that symbol on it. 0x5C? 0x0D? That's a '\n' isn't it?