🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Mini GPS/BDS Unit (AT6558)

    M5 Stick/StickC
    2
    3
    3.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      Woodster
      last edited by

      I have an M5StickC and have tried to get it to work with the Mini GPS/BDS Unit (AT6558), link to product: https://m5stack-store.myshopify.com/products/mini-gps-bds-unit?_pos=1&_sid=fd2c01a5a&_ss=r

      I know it's meant for the M5 Core but I thought with it having a standard grove port it might work. Is this is the problem that that the functionality of the port differs between models?

      W 1 Reply Last reply Reply Quote 0
      • W
        Woodster @Woodster
        last edited by Woodster

        @woodster I have managed to find this article in Japanese which Google translated nicely for me: https://slanew.com/news/612

        All working now - so hopefully this will help other people trying to do the same :)

        0_1619079990416_GPS_M5StickC.jpg

        1 Reply Last reply Reply Quote 0
        • R
          rgrokett
          last edited by

          Just in case the linked document disappears, here's the gist:
          Be sure the TinyGPS++ library is installed in
          Arduino\libraries

          TinyGPS++ here:
          https://github.com/mikalhart/TinyGPSPlus/releases

          // If your M5Stick is the original, use:
          #include <M5StickC.h> 
          
          // If its M5 Stick Plus 2 use:
          #include "M5StickCPlus2.h" 
          
          //The rest should be default:
          #include "TinyGPS++.h"       
          TinyGPSPlus gps;
          HardwareSerial GPSRaw(2);     
          void setup() {
            
            M5.begin(); 
           
            M5.Lcd.setRotation(3);
            M5.Lcd.fillScreen(BLACK);
            M5.Lcd.setTextSize(2);  // Size 1 or 2 as needed
            M5.Lcd.setCursor(20, 15);
            M5.Lcd.println("GPS UNIT TEST");
            GPSRaw.begin(9600, SERIAL_8N1, 33, 32); // M5StickC?GROVE???
            while (!GPSRaw) {
           ;                            // ???????????????
            }
          } 
          void loop() {
            while(GPSRaw.available()) {
              gps.encode(GPSRaw.read());
              if (gps.location.isUpdated()) {
                M5.Lcd.setCursor(20, 30);
                M5.Lcd.print("LAT="); M5.Lcd.print(gps.location.lat(),6);
                M5.Lcd.setCursor(20, 45);
                M5.Lcd.print("LNG="); M5.Lcd.print(gps.location.lng(),6);
                M5.Lcd.setCursor(20, 60);
                M5.Lcd.print("ALT="); M5.Lcd.print(gps.altitude.meters());
              }
            }
          }
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post