Help with the GPS module and M5Stack for AWS
-
I have an M5Stack for AWS, and I have a GPS module connected to its port C. What is the index of the HardwareSerial I should use?
I tried from 0 to 6, but I had no luck reading the data.
HardwareSerial GPSRaw(2);void loop() { if (GPSRaw.available()) { int ch = GPSRaw.read(); Serial.write(ch); } }Connection

What I am doing wrong?
-
Hello @skhaz
have a look at the M5Core2 GPS example. M5Core2 UART uses GPIO 13/14 whereas M5Stack uses GPIO 16/17. If
GPSRaw.begin()is called w/o parameters then GPIO 16/17 are used by default. Try something like below to change the GPIOs:GPSRaw.begin(9600, SERIAL_8N1, 13, 14);BTW: Index
2is fine.Thanks
Felix -
@felmue it worked flawless, thank you so much!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login