bolderflight / ublox

Arduino and CMake library for communicating with uBlox GPS receivers.
MIT License
102 stars 33 forks source link

Use with ESP32 #23

Open AcuarioCat opened 2 months ago

AcuarioCat commented 2 months ago

I had problems using the library with an ESP32 so this is to help anyone in the same position. I found I had to edit out the ->end, ->begin and ->flush lines in Ubx::Begin function in ubx.cpp

My code reads: `

define GPS_BAUD_RATE 921600

const int GPS_RX = 5;
const int GPS_TX = 4;

Serial2.begin(GPS_BAUD_RATE, SERIAL_8N1, GPS_RX, GPS_TX);

Gnss.Config(&Serial2);

`

and with that it works correctly. Hope this helps.