Hi guys. I have some code that takes a character array, but I need to build it dynamically by joining three Strings together. What I have works well enough, but I'm wondering if it would be worthwhile to try and eliminate Strings altogether.
The code I have:
Devices[current_Device] is an array of two Strings containing the device IDs for two bluetooth devices.
//Create the character array to pass to the Serial1.write function
String AT_String = "AT+RNAME? " + Devices[current_Device] + "\r\n";
char charBuf[AT_String.length()+1];
AT_String.toCharArray(charBuf, AT_String.length()+1);
Do you think I should set it up to not use Strings? If so, any ideas to help get me started?