In an Arduino program I\'m working on the GPS sends the coordinates to the arduino through USB. Because of this, the incoming coordinates are stored as Strings. Is there any way
String stringOne, stringTwo, stringThree;
int a;
void setup() {
// initialize serial and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
stringOne = 12; //String("You added ");
stringTwo = String("this string");
stringThree = String();
// send an intro:
Serial.println("\n\nAdding Strings together (concatenation):");
Serial.println();enter code here
}
void loop() {
// adding a constant integer to a String:
stringThree = stringOne + 123;
int gpslong =(stringThree.toInt());
a=gpslong+8;
//Serial.println(stringThree); // prints "You added 123"
Serial.println(a); // prints "You added 123"
}