Hi,
I would like to convert a string captured from the serial port to integer. Here are the codes that I used:
char TempSP[20];
int SPInt;
ComRdTerm (Port1,TempSP,3,10); returned string: TempSP = "5DC"
1. Use Scan function: Scan(TempSP,"%s>%i",&SPInt); returned SPInt = 5
2. Use Fmt function: Fmt(&SPInt,"%i<%s",TempSP); returned SPInt = 5
Expected result: 1500
I am hoping some of you may be able to help me with this.
Thanks in advance.
Tony