TTGO T-Watch V2的功能应用与实现
1. GPS定位功能
GPS定位功能主要通过解析NMEA消息来显示当前时间、海拔、速度、追踪卫星数量以及当前位置的经纬度。以下是详细的操作步骤和代码实现:
- 显示GPS信息 :使用 appGPSout 函数来显示GPS位置信息。
void appGPSout() // function to display GPS location
{
tft->fillScreen(TFT_BLACK); //display GPS icon
tft->drawBitmap(0, 0, GPSimage, 32, 32, TFT_WHITE);
tft->setTextSize(2); // change text size to 2
tft->setTextColor(TFT_YELLOW);
tft->setCursor(80, 10);
tft->print("GPS data");
tft->setTextColor(TFT_GREEN, TFT_BLACK);
unsigned long last, lag;
int16_t x, y;
last = millis();
while (!ttgo->getTouch(x, y)) // wait for touch
{
ttgo->gpsHandler(); // handle
超级会员免费看
订阅专栏 解锁全文
2678

被折叠的 条评论
为什么被折叠?



