I am having a bit of difficulty with the Arduino project I am currently working on.
The purpose of the function I am developing is to take in a char array variable received via an NRF wireless module and separate this into 2 different string variables. The first 13 characters into one string, and the remaining into another.
void receiveData(char* receivedData){ // Function to place the received data into the correct variable.
for(int i = 0;i < sizeof(receivedData);i++){
if(i < 13){
String variableName = variableName + receivedData[i]; // Builds a string of the variablename.
}
else{
String value = value + receivedData[i]; // Builds a string of the value.
}
}
I have worked through a few different ways but no luck.
Any help will be greatly appreciated, Thank you!