Thursday, July 23, 2020

ATGM336H-5N/ESP32, read GPS position using TinyGPS++

To read ATGM336H-5N GNSS Module from ESP32/ESP8266, or Arduino, the TinyGPS++ library can be use.

 TinyGPS++ is a new Arduino library for parsing NMEA data streams provided by GPS modules. To install this library, download here, unzip the archive into the Arduino “libraries” folder, and restart Arduino. You should rename the folder “TinyGPSPlus”.

The TinyGPS++ connect GPS module using SoftwareSerial. To make it work on ESP32, install EspSoftwareSerial in Arduino IDE Library Manager.

Now you can open TinyGps++ DeviceExample.

Modify the RXPin and TXPin to match with you connection. It's 16 and 17 in my case. And change GPSBaud to 9600.
Connection between ESP32 and ATGM336H-5N:
ESP32		ATGM336H-5N
16 (RX)		TX
17 (TX)		RX
static const int RXPin = 16, TXPin = 17;
static const uint32_t GPSBaud = 9600;

Verify and Upload to run it.

No comments:

Post a Comment