GPS data displayed on E paper

I need help to display GPS data on my E paper 4.3 waveshare display. I have made a program that works with a LCD display but when i use my E paper display I can not get the GPS data to display. I can not find any info on what i need to do. I can get words to display on screen but have no idea on getting GPS data to display E.G. using TinyGPS.h library "double BoatCourse = gps.f_course();" how do i code this to display? Could any one point me in the right direction.

Post your code.

beeky:
I can get words to display on screen but have no idea on getting GPS data to display

By 'words' I'm guessing (because you have not yet posted your code) that you are calling some function and passing a character pointer (or maybe a String). If the library uses .print("word") then you can probably just use .print(variable). If it only has a special function that displays character string you will have to convert. To do that look at the standard C library functions itoa() (Integer to ASCII) and dtoa() (Double-precision floating point to ASCII).

#include <epd.h>
#include <TinyGPS.h>
TinyGPS gps;

void Rons_text(void) // This can be any name
{
      epd_set_en_font(ASCII64);  //Font size
 
   epd_disp_string("Testing      4     September   !", 80, 250); //100 moves x axis 450 moves y axis
   epd_udpate();
   delay(5000); // delay to print message. If you get the delay right when screen refreshes there is 
                // no black screen
}

void setup(void)
{
  Serial.begin(115200); //Serial monit
  Serial1.begin(9600);  //RX1 (19) Gps signal
  
   epd_clear(); //this clears on refresh each time
   epd_init();
   epd_wakeup();
   epd_set_memory(MEM_NAND);
}

void loop(void)
{ 
     char flag = 0;
   Rons_text();
  while(Serial1.available()){
  if(gps.encode(Serial1.read()))
{
  
  double BoatSpeed = gps.f_speed_knots();  //'Double'float'output decimals, 'int' output whole numbers only (no decimal places)
  double BoatCourse = gps.f_course();      //to remove decimal point use int not float  "double" is more accurate
          CMD_SET_EN_FONT;(BoatCourse,0);    //This is what i need to display
          
  
    }
  }
}

That doesn't compile.

What Arduino do you have?

How is everything connected?

Here's a version of your sketch that uses my NeoGPS library:

#include <epd.h>
const int EPD_WAKEUP_PIN = 2;
const int EPD_RESET_PIN  = 3;

#include <NMEAGPS.h>
NMEAGPS gps;
gps_fix fix;
#define gpsPort Serial1 // just an alias so it's easier to read

void Rons_text() // This can be any name
{
  epd_clear();
  epd_disp_string("Testing      4     September   !", 80, 250);

  double BoatSpeed  = fix.speed();
  double BoatCourse = fix.heading();

  char heading_string[ 16 ];
  dtostrf( BoatCourse, 4, 2, heading_string ); // format the heading into a char array
  epd_disp_string( heading_string, 10, 100 ); // display the char array

  epd_udpate();

  // Just some debug prints to make sure the GPS is working.
  //   Delete these later.
  Serial.print( "\nspeed: " );
  Serial.print( BoatSpeed );
  if (not fix.valid.speed)
    Serial.print( " (not valid)" );
  Serial.print( ", heading: " );
  Serial.print( heading_string );
  if (not fix.valid.speed)
    Serial.print( " (not valid)" );
  Serial.println();
}

void setup()
{
  Serial.begin(115200); //Serial monitor
  gpsPort.begin(9600);  //RX1 (19) Gps signal

 pinMode(EPD_WAKEUP_PIN, OUTPUT);
 pinMode(EPD_RESET_PIN, OUTPUT);

  epd_wakeup( EPD_WAKEUP_PIN );

  epd_set_memory( MEM_NAND );
  epd_set_en_font( ASCII64 );
}

void loop()
{
  if (gps.available( gpsPort )) {
    fix = gps.read();  // get the latest GPS information fields
    
    Rons_text();
  }
}

Notice that it does not use delay. Using delay will prevent the Arduino from parsing the GPS characters correctly. If you want to try it, you can get NeoGPS from the Arduino IDE Library Manager, under the menu Sketch -> Include Library -> Manage Libraries. Even if you don't use it, there is lots of information on the Installation and Troubleshooting pages.

That EPD library is not very good. Do not use the epd_init function. And I would recommend different connections, depending on which Arduino you have.

Thanks so much for the info so far. Need some time to check out. Work getting in the way.

Thanks –dev the sample code
I am using a mega2560 I connect gps to pin19 (RX1) and pin 1 (TX0) for my e paper display.
The code I posted I copy/paste it and it worked for me?
Your code would not compile.” 7: error: 'gps_fix' does not name a type”
I searched the Web to resolve the error but could not find a solution. I’m going to need HELP please.

beeky:
I connect gps to pin19 (RX1) and pin 1 (TX0) for my e paper display.

Yes, that should work.

Eventually, you could move the ePaper display to a different serial port, but you'd have to modify the library.

The code I posted I copy/paste it and it worked for me?
Your code would not compile." 7: error: 'gps_fix' does not name a type"

I copied my sketch from reply #4, and it builds correctly for me.

Did you edit GPSport.h, NMEAGPS_cfg.h or GPSfix_cfg.h? The default files should work for a Mega.

Did you try any of the examples? NMEA.ino should work with your connections.

Hooray Devin. You have me going now. After working out that the neoGPS library i first downloaded had files missing i have it working some what now. I think i can burn some hour up and get somewhere with it. Thank you so much for the help. Might have to call on you again. cheers