Skip to content

ArduinoOTA interferes with hardware serial #3881

Closed
@djdehaan

Description

@djdehaan

Hi all,

Not a question, but a tip for others who struggle. I use a Wemos D1 with a GPS receiver and SD-card. And I did not get the ArduinoOTA function to work. IT started uploading but after 10 or 12 or 8 bullets appearing in the IDE it stopped uploading. After long searching I found the reason.

Earlier, I found it most stable if I address that GPS using hardware serial, meaning I connect it on the RX/TX pins. Appearantly, that interferes with the upload process. When I add the following code in the Setup() routine, the upload works like a charm:

  ArduinoOTA.onStart([]() {
    Serial.end();
  });
  ArduinoOTA.setHostname("CarTrax");
  ArduinoOTA.begin();

Maybe this is completely logic, but it took me some time to find out and I did not find similar cases online.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions