i am sending value as string so it will start reading every character in between < and > which example < -32,-56 > but i need to change this value from character to int.
On the sender, you are sending a string like L-32,-45,H. Why you put that , after the second value, I do not know. Why you are using L and H instead of < and > (or other non-letter symbols), I do not know.
Then, on the receiver, you are putting ',' in the array, where you should be putting '\0'. Why?
Each character that is received is looked at to determine if it should be added to the array. The start of packet marker is not. A comma is put in it's place, instead. The flag that says that the start of the packet was received is set to true.
The characters up to the end of packet markers ARE added to the end of the array, followed be another comma.
When the end of the packet is detected, the flag that indicates that the end of packet marker was received is set to true. There should be a break; statement after this, but it is missing.
You end up with "-32,-45,," in the array. Now you need to parse it. The inData array does not contain a single number, AND is not NULL terminated. So, it can not be passed to atoi(). You will need to read up on either sscanf or strtok AND you need to NULL terminate the array.
this is my school project and i am not even in programming field
What field are you in?
Not Communications, I hope, unless English is not your native language. If it isn't, forget about this last paragraph. You English is better than my ______ (whatever you native language is).
While you didn't state what your problem was, I hope I have given you enough information to solve it.