Im tryng to implement the NEO-6M-GPS module with TinyGPS on a HTCC-AB01. Even though the same library and module works when used with as esp32 i cant get it to work on this cubecell. please help. here is the most basic example i could think and that doesnt work
ISSUE : The device doesnt seem to get anything from gps_serial.available.
#include <Arduino.h>
#include <TinyGPS++.h>
// Pinos padrão do HTCC-AB01 (Serial1)
#define GPS_RX 14 // Conectado ao TX do GPS
#define GPS_TX 15 // Conectado ao RX do GPS
#define VEXT 21 // Pino que controla VEXT
HardwareSerial gpsSerial(1); // Usar UART1
TinyGPSPlus gps;
void setup() {
pinMode(Vext, OUTPUT);
digitalWrite(Vext, LOW); // Ativa VEXT (baixa para ativar)
Serial.begin(115200); // USB serial
delay(1000);
Serial.println(“Iniciando GPS…”);
gpsSerial.begin(9600, SERIAL_8N1, GPS_RX, GPS_TX); // Inicializa UART1
Serial.println(“Esperando dados do GPS…”);
}
void loop() {
// Leitura contínua do GPS
while (gpsSerial.available() > 0) {
char c = gpsSerial.read();
gps.encode©; // Processa caractere
Serial.write©; // Mostra sentenças NMEA (debug)
}
// Mostra dados processados
if (gps.location.isUpdated()) {
Serial.println("========== FIX OBTIDO ==========");
Serial.print("Latitude: "); Serial.println(gps.location.lat(), 6);
Serial.print("Longitude: "); Serial.println(gps.location.lng(), 6);
Serial.print("Satélites: "); Serial.println(gps.satellites.value());
Serial.print("HDOP: "); Serial.println(gps.hdop.hdop());
Serial.print("Altitude: "); Serial.println(gps.altitude.meters());
Serial.print(“Velocidade: “);Serial.println(gps.speed.kmph());
Serial.println(”================================”);
delay(2000); // Espera para nova leitura
}
}