LoginSignup
4
6

More than 5 years have passed since last update.

M5Stack > GPS

Posted at

gpsraw.ino

gpsraw.ino
#include <M5Stack.h>

HardwareSerial GPSRaw(2);

void setup() {

  M5.begin();
  GPSRaw.begin(9600);

  Serial.println("hello");
  termInit();
}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial.available()) {
    int ch = Serial.read();
    GPSRaw.write(ch);  
  }

  if(GPSRaw.available()) {
    int ch = GPSRaw.read();
    Serial.write(ch);
    termPutchar(ch);
  }
}

結果

$GNRMC,022323.00,V,,,,,,,010218,,,N*6B
$GNVTG,,,,,,,,,N*2E
$GNGGA,022323.00,,,,,0,00,99.99,,,,,,*7A
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E
$GNGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*2E
$GPGSV,3,1,10,05,07,131,,10,21,316,,12,20,151,,13,21,064,*7A
$GPGSV,3,2,10,15,51,051,,20,62,135,,21,40,248,27,24,89,055,*77
$GPGSV,3,3,10,25,01,183,,32,03,274,*77
$GLGSV,1,1,02,73,17,194,,80,66,159,*6C
$GNGLL,,,,,022323.00,V,N*56

FullExample.ino

TinyGPS++ | Arduiniana

GPS CLOCK with M5STACK

macsbug で公開していただいているGPS CLOCK with M5STACKを動かしました。

動作するにあたり以下の場所にあるFree_Fonts.hをスケッチと同場所にコピーしました。

ユーザー名/Documents/Arduino/libraries/M5Stack/examples/Advanced/Display/Free_Font_Demo/Free_Fonts.h

GPS CLOCK with M5STACK | macsbug

4
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
6