answering my own question:
#include <M5EPD.h>
#include <TinyGPS++.h>
static const uint32_t GPSBaud = 9600;
TinyGPSPlus gps;
HardwareSerial ss(2);
M5EPD_Canvas canvas(&M5.EPD);
char latStr[10];
char lonStr[10];
char speedStr[10];
void setup() {
M5.begin();
M5.EPD.SetRotation(0);
M5.EPD.Clear(true);
ss.begin(GPSBaud, SERIAL_8N1, 19, 18);
canvas.createCanvas(960, 540);
canvas.setTextSize(3);
canvas.clear();
}
void loop() {
int b = ss.available();
while (b > 0) {
gps.encode(ss.read());
double lat = gps.location.lat();
double lon = gps.location.lng();
double speed = gps.speed.kmph();
dtostrf(lat, 2, 2, latStr);
dtostrf(lon, 2, 2, lonStr);
dtostrf(speed, 2, 2, speedStr);
canvas.clear();
canvas.drawString("Lat: " + String(latStr), 50, 100);
canvas.drawString("Lon: " + String(lonStr), 50, 150);
canvas.drawString("Speed: " + String(speedStr), 50, 200);
canvas.pushCanvas(0, 0, UPDATE_MODE_DU4);
}
}