Is there a method in the TinyGPS++ library that will allow you to do send commands to the GPS itself? So you can change the update rate, the sentences, etc.?
I didn’t find a TinyGPSPlus.sendCommand, so I just added my own. I’ll put it below, just in case someone else might need it.
static void sendCommand(const char *str)
{
Serial1.println(str);
delay(500);
}
I appreciate you posting that! Thank you for creating that command.
Kyle
How would i write this out in arduino as i get an error saying error: a function-definition is not allowed here before ‘{’ token . i wrote this in void loop{} if that’s any information for you
thanks
Although this is not an Arduino forum, we still might be able to help if you provided us with a better understanding of what this is
The post(s) you are referring to are 6+ years old.
However, function definitions are typically not inside other functions (which void loop() { ... }
is).
Hence, my take answering your "cryptic" question would look like
void setup() {
// ... whatever you need to do to setup your program
}
void loop() {
// ... whatever your program should keep on doing
}
static void sendCommand(const char *str) {
Serial1.println(str);
delay(500);
}