Serial.print(mySerial.find("$GP")) just works fine, but I have no clue as to how to use parseInt()
That snippet tells us nothing about what the mySerial object is. The entire post tells us nothing about what class has parseInt() or parseFloat() methods that you want to use, so we can't go look at the documentation that you should be looking at.
Sorry for this shortage on information.
Below is the experimental code I use only to find ot how the stuff works.
It is based on the SoftwareSerial example by Tom Igoe
based on examples by David Mellis and Heather Dewey-Hagborg
written: 6 Jan 2007
Both mySerial.find("$GP") and parseInt(list) are explained in the Reference section of Stream, just below the Serial section.
(Stream - Arduino Reference)
*/
// include the SoftwareSerial library so you can use its functions: #include <SoftwareSerial.h>
#define rxPin 2 #define txPin 3
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
byte pinState = 0;
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(4800);
Serial.begin(9600);
}
void loop() {
// listen for new serial coming in:
if(mySerial.available())
{
Serial.print(mySerial.find("$GP")); //this actually finds the characters in the stream.
// Serial.print(mySerial.parseInt(list);
char someChar = mySerial.read();
// print out the character:
Serial.print(someChar);
}