Hey Folks, merry Christmas to all of you. I am encountering the following problem. I habe a TTGo board V1 and i tried compiling this code on it
#include <TinyGPS++.h>
#include <axp20x.h>
TinyGPSPlus gps;
HardwareSerial GPS(1);
AXP20X_Class axp;
void setup()
{
Serial.begin(115200);
Wire.begin(21, 22);
if (!axp.begin(Wire, AXP192_SLAVE_ADDRESS)) {
Serial.println("AXP192 Begin PASS");
} else {
Serial.println("AXP192 Begin FAIL");
}
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
axp.setPowerOutPut(AXP192_DCDC2, AXP202_ON);
axp.setPowerOutPut(AXP192_EXTEN, AXP202_ON);
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
GPS.begin(9600, SERIAL_8N1, 34, 12); //17-TX 18-RX
}
void loop()
{
Serial.print("Latitude : ");
Serial.println(gps.location.lat(), 5);
Serial.print("Longitude : ");
Serial.println(gps.location.lng(), 4);
Serial.print("Satellites: ");
Serial.println(gps.satellites.value());
Serial.print("Altitude : ");
Serial.print(gps.altitude.feet() / 3.2808);
Serial.println("M");
Serial.print("Time : ");
Serial.print(gps.time.hour());
Serial.print(":");
Serial.print(gps.time.minute());
Serial.print(":");
Serial.println(gps.time.second());
Serial.print("Speed : ");
Serial.println(gps.speed.kmph());
Serial.println("**********************");
smartDelay(1000);
if (millis() > 5000 && gps.charsProcessed() < 10)
Serial.println(F("No GPS data received: check wiring"));
}
static void smartDelay(unsigned long ms)
{
unsigned long start = millis();
do
{
while (GPS.available())
gps.encode(GPS.read());
} while (millis() - start < ms);
}
I can see that the GPS LED is blinking so it means that i’m getting fixes but i still see “No Gps” on the serial interface, did anyone have the same problem and could be able to solve it?