How to Build a DIY GNSS Reference Station

Hi,

I have followed the tutorial to make a DYI GNSS reference station with an ESP32 and this works well. (https://learn.sparkfun.com/tutorials/ho … p-option-2)

However, I would like to modify the .ino code for the NTRIP server on the ESP32, so it starts automatically without needing a key input.

I fail to understand how, or why it even waits for a key input as there isn’t any function like cin.get() in c++ or getchar() in c, etc.

I’m looking specifically at this piece of code:

void loop()
{
  if (Serial.available())
    beginServing();

  Serial.println(F("Press any key to start serving"));

  delay(1000);
}

I have looked through the beginServing function as well and couldn’t find anything regarding keystrokes, besides another line printing

Serial.println("User pressed a key");
Serial.println("Disconnecting...");
ntripCaster.stop();

You can find the whole code here: https://github.com/sparkfun/SparkFun_u- … Server.ino

I have researched beforehand and found this thread on the arduino forums: https://forum.arduino.cc/t/pause-a-sket … d/495039/7

Does this mean I just need to flush and do Serial.read() to get it running with manual input?

→ I’m looking for a way to automatically start the NTRIP server on a ESP32 which is connected to a ZED-F9P, once it has power.

Please excuse the question if this sounds silly, I don’t usually program arduino :confused:

Thanks in advance :slight_smile:

John