Using Serial.list() with GTextField
in
Contributed Library Questions
•
2 years ago
Question: how to convert from String[] to String?
Solution: join() function
I would like to output the available serial ports to the GTextField.
- String SerialList[] = Serial.list();
- txfHelp = new GTextField(this,SerialList, 6, 160, 324, 74, true);
- // This is the feedback text panel for selection of USB COM port
The constructor GTextField(mySerialGUI, String[], int, int, int, int, boolean) is undefined
I can output static text just fine because "Sample Text" is of the type String, not String[]. So my problem is converting String[] to String.
- String SerialList[] = "Sample Text";
- txfHelp = new GTextField(this,SerialList, 6, 160, 324, 74, true);
- // This is the feedback text panel for selection of USB COM port
1