gps speedometer with m8n ublox speedometer

hello, i am trying to use this code for a simple gps speedometer but keep getting the warning:

class NMEAGPS' has no member named 'send_P'

https://github.com/SlashDevin/NeoG

//Berni Neu
/*
 Connections:
 GPS TX -> Arduino 0 (disconnect to upload this sketch)
 GPS RX -> Arduino 1
 Screen SDA -> Arduino A4
 Screen SCL -> Arduino A5
*/

#include <NMEAGPS.h>
NMEAGPS gps;


#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_DEV_0|U8G_I2C_OPT_NO_ACK|U8G_I2C_OPT_FAST); // Fast I2C / TWI

#define gpsPort Serial

void setup()
{
  u8g.setColorIndex(1);

  gpsPort.begin(9600);

  gps.send_P( &gpsPort, F("PUBX,40,GLL,0,0,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,GSV,0,0,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,GSA,0,0,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,VTG,0,0,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,ZDA,0,0,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,RMC,0,1,0,0,0,0") );
  gps.send_P( &gpsPort, F("PUBX,40,GGA,0,1,0,0,0,0") );

}

char spinner( uint8_t pos )
{
  static const char spinnerChars[] PROGMEM = "/-\\|"; // saves RAM!

  return (char) pgm_read_byte( &spinnerChars[ pos % 4 ] ); // ...but requires special read
}

uint16_t kph              = 0;
uint16_t lastScreenUpdate = 0;
byte     screenRefreshes  = 0;
byte     gpsUpdates       = 0;

void loop() {

  uint16_t now = millis();

  if ( gps.available( gpsPort ) ) {
    fix        = gps.read();
    gpsUpdates++;

    if (fix.valid.speed)
      kph = (((uint32_t) fix.spd.whole) * 1852) / 1000; // knots to kph, integer math
    else
      kph = 0;
    lastScreenUpdate = now - 102; // force a redraw
  }

  if ( now - lastScreenUpdate > 101 ) {
    updateScreen();
    lastScreenUpdate = now;
    screenRefreshes++;
  }
}

void draw() {
  //u8g.setScale2x2(); don't do this!
  u8g.setFont(u8g_font_courB24);
  u8g.setPrintPos( 36, 45 );
  if (kph < 100)      // alternative to sprintf, just print leading spaces
    u8g.write( ' ' );
  if (kph < 10)
    u8g.write( ' ' );
  u8g.print( kph );

  //u8g.undoScale();
  u8g.setFont(u8g_font_fur11);
  u8g.setPrintPos( 2, 12 );
  u8g.write( spinner( screenRefreshes ) );
  u8g.write( ' ' );

  u8g.write( spinner( gpsUpdates ) );
  u8g.write( ' ' );

  if (!fix.valid.satellites || (fix.satellites < 10))
    u8g.write( ' ' );
  if (fix.valid.satellites)
    u8g.print( fix.satellites );
  else
    u8g.write( ' ' );
}

void updateScreen() {

  u8g.firstPage();
  do {
    draw();
  } while( u8g.nextPage() );
}

Maybe the library you are using does not have a send_P function, why do you think it has ?

See the 'How to Use This Forum - Please Read' post for details on how to use this forum.

In particular see No.7 on how to post code and No.11 'please post a link to library'

thanks

sorry about the code, im new to the site

Copy and paste ALL of the messages into a reply here. I suspect that some error somewhere is causing the compiler to refuse to compile the send_P() function.

thank you I fixed that, I had another library with a similar name that it was using instead. It is fixed now

but now I am getting a message
'fix' was not declared in this scope

dmitri_gorchev:
but now I am getting a message
'fix' was not declared in this scope

Probably a problem with your code, or the library you are using (BIG HINT).

thank you so much it was the library, sorry for not looking at that before i checked the forum

do you know how i would make the gps run at 10hrtz

As you have installed the NeoGPS library, there is an example under File/Examples/NeoGPS/ubloxRate.

You might also have to increase your baud rate.

I have not tried it myself, but it might give you a hint.