I think one problem is that you are actioning single chars as they come in and not waiting for a RETURN or something.
So you get '1' and action that, then you get '0' and action that. At no time does your code see "10".
I think one problem is that you are actioning single chars as they come in and not waiting for a RETURN or something.
So you get '1' and action that, then you get '0' and action that. At no time does your code see "10".