Arduino UNO R4 WiFi doesnt detect GY-GPS6MV2

I bought the UNO R4 WiFi, all works fine, except the reception of data from the GPS Module. I put the pins on the right pins (3, 4) and when i execute the boolean gps.available() it always false.

void setup() {
  Serial.begin(9600);
  gps.begin(9600);
  iniciaLed();
  while (!Serial) {
    ;  // Esperar a que se establezca la conexión serial
  }

  // Conexión a la red WiFi
  while (status != WL_CONNECTED) {
    Serial.print("Conectando a la red WiFi...");
    status = WiFi.begin(ssid, pass);
    delay(5000);  // Esperar 5 segundos para volver a intentar la conexión
  }

  Serial.println("Conexión WiFi establecida");
}

void loop() {
  if (client.connect(server, 8080)) {  // Conexión al servidor en el puerto 8080 (HTTP)
    Serial.println("Conectado al servidor\n");
    if (gps.available())
    {
     String jsonp = "{\"funciono\": \"Funciono\", \"intento\": \"Good\"}";;
     hacerPeticion2(jsonp.length(), jsonp);
    } else {
      String jsonp = "{\"funciono\": \"NoFunciono\", \"intento\": \"Bad\"}";;
     hacerPeticion2(jsonp.length(), jsonp);
    }

This is my code. (A part of it, but is where the GPS send me that its not working.)

Welcome to the forum

Why do you think that they are the correct pins to use ? Where is the gps object defined ? Presumably by using SoftwareSerial but there is no need to use that.
Did you forget to post some of your sketch ?

The Uno R4 WiFi has two serial interfaces

Serial is used by the the USB connection for uploading code and the Serial monitor

Serial1 uses pins 0 and 1 and does not interfere with the Serial interface or vice versa

#include <WiFiS3.h>
#include <ArduinoGraphics.h>
#include <Arduino_LED_Matrix.h>
#include <SoftwareSerial.h>

char ssid[] = "MIWIFI_6C34";      // Nombre de tu red WiFi
char pass[] = "hxtnxtuQ";  // Contraseña de tu red WiFi
int status = WL_IDLE_STATUS;

char server[] = "192.168.1.144";  // Dirección del servidor
WiFiClient client;
ArduinoLEDMatrix matrix;
SoftwareSerial gps(4,3);
char dato=' ';

void setup() {
  Serial.begin(9600);
  gps.begin(9600);
  iniciaLed();
  while (!Serial) {
    ;  // Esperar a que se establezca la conexión serial
  }

  // Conexión a la red WiFi
  while (status != WL_CONNECTED) {
    Serial.print("Conectando a la red WiFi...");
    status = WiFi.begin(ssid, pass);
    delay(5000);  // Esperar 5 segundos para volver a intentar la conexión
  }

  Serial.println("Conexión WiFi establecida");
}

void loop() {
  if (client.connect(server, 8080)) {  // Conexión al servidor en el puerto 8080 (HTTP)
    Serial.println("Conectado al servidor\n");
    if (gps.available())
    {
     String jsonp = "{\"funciono\": \"Funciono\", \"intento\": \"Good\"}";;
     hacerPeticion2(jsonp.length(), jsonp);
    } else {
      String jsonp = "{\"funciono\": \"NoFunciono\", \"intento\": \"Bad\"}";;
     hacerPeticion2(jsonp.length(), jsonp);
    }
    // Construir el cuerpo del JSON
    String json = "{\"nombre\": \"Camión1\", \"latitud\": 55.232, \"longitud\": 23.3232}";

    // Enviar la solicitud POST al servidor
    hacerPeticion(json.length(), json);
    textoLed("    PETICION 1    ");
    delay(5000);
    String json2 = "{\"nombre\": \"Camión2\", \"latitud\": 45.232, \"longitud\": 93.3232}";
    hacerPeticion(json2.length(), json2);
    textoLed("    PETICION 2    ");
    delay(5000);
  } else {
    Serial.println("Error al conectarse al servidor");
  }
  textoLed("    PAFERGONSL    ");
  delay(5000);  // Esperar 5 segundos antes de enviar otra solicitud
}

void hacerPeticion(int length, String json) {
  client.println("POST /api/gps/postPosition HTTP/1.1");
  client.println("Host: ");
  client.println("Content-Type: application/json");
  client.print("Content-Length: ");
  client.println(length);
  client.println();
  client.println(json);
}

void hacerPeticion2(int length, String json) {
  client.println("POST /api/gps/mapa HTTP/1.1");
  client.println("Host: ");
  client.println("Content-Type: application/json");
  client.print("Content-Length: ");
  client.println(length);
  client.println();
  client.println(json);
}

void iniciaLed() {
  matrix.begin();

  matrix.beginDraw();

  matrix.stroke(0xFFFFFFFF);
  matrix.textScrollSpeed(100);

  const char text[] = "  UNO r4  ";
  matrix.textFont(Font_4x6);
  matrix.beginText(0, 1, 0xFFFFFF);
  matrix.println(text);
  matrix.endText(SCROLL_LEFT);

  matrix.endDraw();
}

void textoLed(const char text[]) {
  matrix.beginDraw();

  matrix.stroke(0xFFFFFFFF);
  matrix.textScrollSpeed(50);

  matrix.textFont(Font_5x7);
  matrix.beginText(0, 1, 0xFFFFFF);
  matrix.println(text);
  matrix.endText(SCROLL_LEFT);

  matrix.endDraw();
}

This is my full sketch.
I think that the 3 and 4 pins are the corrects because in all sites that talk about it, the pins that they connect it is 3 and 4, and i thought that is that.

Forget about SoftwareSerial on the Uno R4

Connect the GPS to pins 0 and 1 and use Serial1 to read the data

Okey, i get the gps.available on true, but i dont get any data.

Post your sketch that uses Serial1

I do it on a new sketch:

void setup() {
  Serial.begin(9600);
  
  Serial1.begin(9600);
}

void loop() {
  if (Serial1.available()) {
    char c = Serial1.read();
    Serial.print(c);
  }

  if (Serial.available()) {
    char c = Serial.read();
    Serial1.print(c);
  }
}

Check that you have the Rx/Tx connections on pins 0 and 1 the right way round and delete the Serial.available() test and its associated code

Are you testing this indoors and has the GPS got a satellite lock ? This is usually indicated by a flashing LED on the GPS module

There is not any flashing LED and i try it in doors and outdoors. And yes, i check the Rx and Tx is well connected

How are you powering the GPS module and the Arduino itself ?

Module 3.3v and the Arduino USB

Probably the gps module is damaged?

How are you powering the project ?

The arduino is connected with a USB C to the computer.