I get values in serial read using the following code,
int32_t bytesSent = 0;
if (mySerial.available()) {
bytesSent = mySerial.read();
}
Output:
Serial.write(bytesSent); gives -1199/1211 value.
I need to split this value into two values. That should separate using "/" point.
Value 1 - -1199
Value 2 - 1211
The following code is used for char type values separate when numberArray3[20] = "-1199/1211"
char numberArray3[20];
int len = strlen(numberArray3);
int pos = strcspn(numberArray3,"/");
char First[20];
char Second[20];
strncpy(Second, numberArray3+pos+1, len);
strncpy(First, numberArray3, pos);
Serial.println(First);
Serial.println(Second);