ESP8266 and Neo 6m with blynk

I’m trying to create gps project using esp8266 and neo 6m with blynk, when I upload the code the neo 6m start blinking but in the serial monitor it’s written ( no gps detected: check wiring). But the connection is right and code.

CODE & DIAGRAM

Untitled


#include <SoftwareSerial.h>
#define BLYNK_PRINT Serial

//Install the following Libraries
#include <TinyGPS++.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

//GPS RX to D1 & GPS TX to D2 and Serial Connection
const int RXPin = 4, TXPin = 5;
const uint32_t GPSBaud = 9600; 
SoftwareSerial gps_module(RXPin, TXPin);

TinyGPSPlus gps; 
WidgetMap myMap(V0); //V0 - virtual pin for Map

BlynkTimer timer;

//Variable  to store the speed, no. of satellites, direction
float gps_speed;
float no_of_satellites;
String satellite_orientation;

#define BLYNK_TEMPLATE_ID "************"
#define BLYNK_TEMPLATE_NAME "************"
#define BLYNK_AUTH_TOKEN "******************"

char auth[] = "******************";              
char ssid[] = "****************";
char pass[] = "****************";

//unsigned int move_index;         
unsigned int move_index = 1;      
  

void setup()
{
  Serial.begin(9600);
  Serial.println();
  gps_module.begin(GPSBaud);
  Blynk.begin(auth, ssid, pass);
  timer.setInterval(5000L, checkGPS); 
}

void checkGPS(){
  if (gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
      Blynk.virtualWrite(V4, "GPS ERROR");  
  }
}

void loop()
{
  while (gps_module.available() > 0) 
  {
    //displays information every time a new sentence is correctly encoded.
    if (gps.encode(gps_module.read()))
    displayInfo();
  }
  
  Blynk.run();
  timer.run();
}

void displayInfo()
{
  if (gps.location.isValid()) 
  {
    //Storing the Latitude. and Longitude
    float latitude = (gps.location.lat());
    float longitude = (gps.location.lng()); 
    
    //Send to Serial Monitor for Debugging
    Serial.print("LAT:  ");
    Serial.println(latitude, 6);  // float to x decimal places
    Serial.print("LONG: ");
    Serial.println(longitude, 6);
    
    Blynk.virtualWrite(V1, String(latitude, 6));   
    Blynk.virtualWrite(V2, String(longitude, 6));  
    myMap.location(move_index, latitude, longitude, "GPS_Location");
    
    //get speed
    gps_speed = gps.speed.kmph();
    Blynk.virtualWrite(V3, gps_speed);
       
    //get number of satellites
    no_of_satellites = gps.satellites.value();
    Blynk.virtualWrite(V4, no_of_satellites);

    // get the satellite orientation/direction
    satellite_orientation = TinyGPSPlus::cardinal(gps.course.value());
    Blynk.virtualWrite(V5, satellite_orientation);
  }
  
  Serial.println();
}

@Milad_Khaled Please edit your post, using the pencil icon at the bottom, and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:
```

Copy and paste these if you can’t find the correct symbol on your keyboard.

Pete.

1 Like

Hi,
It is displayed correctly now

Thank you,

No, it is not.

Pete.

1 Like

it is good now

No, it is not.

You’ve used block quotes on the entire thing.

I’ve given you triple backticks to copy/paste, but you don’t seem to want to do that.

Pete.

1 Like

Sorry for the misunderstanding

I’d suggest that you power the GPS module from the 5v pin on the NodeMCU.

Pete.

Thanks for responding, I will definitely try, maybe this is the problem