I am using a code as below to read from a ADC and save the values a SD card file ... it uses the String object.
Needless to mention this is code example from the net and almost all of them use the String variable to keep it simple.
The alternate for this would a char array and formatted using sprintf(). Any other option ?
The question is when there is lot of spare memory and its not a blazing fast application why not just live with the String with the capital S?
void readAnalogValues()
{
if ( millis() - readAdcMs > readAdcInterval ) {
readAdcMs = millis();
adc_value1 = adc->adc0->analogRead(readPin1);
voltage1 = adc_value1 * resolution;
delay(2);
adc_value2 = adc->adc0->analogRead(readPin2);
voltage2 = adc_value2 * resolution;
delay(2);
adc_value3 = adc->adc0->analogRead(readPin3);
voltage3 = adc_value3 * resolution;
delay(2);
adc_value4 = adc->adc0->analogRead(readPin4);
voltage4 = adc_value4 * resolution;
delay(2);
adc_value5 = adc->adc0->analogRead(readPin5);
voltage5 = adc_value5 * resolution;
delay(2);
adc_value6 = adc->adc0->analogRead(readPin6);
voltage6 = adc_value6 * resolution;
delay(2);
adc_value7 = adc->adc0->analogRead(readPin7);
voltage7 = adc_value7 * resolution;
delay(2);
adc_value8 = adc->adc0->analogRead(readPin8);
voltage8 = adc_value8 * resolution;
delay(2);
sdFile.println(String(now()) + "," + String(voltage1, 3) + "," + String(voltage2, 3) + "," + String(voltage3, 3) + "," + String(voltage4, 3) + "," + String(voltage5, 3) + "," + String(voltage6, 3) + "," + String(voltage7, 3) + "," + String(voltage8, 3));
}
}