Mini GPS/BDS Unit (AT6558)
-
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?
-
@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 :)
-
Just in case the linked document disappears, here's the gist:
Be sure the TinyGPS++ library is installed in
Arduino\librariesTinyGPS++ 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()); } } }