String s = "123.456";
char buffer[10];
void setup() {
  Serial.begin(115200);
  s.toCharArray(buffer,10);
  Serial.println(buffer);
}

void loop() {
  // put your main code here, to run repeatedly:

}