M5stack GPS, use Serial2 and Serial1
-
This device : ATOMIC GPS Base (M8030-KT) uses Serial2 to communicate with the GPS chip.
Now i am trying to use Serial1.begin(19200, SERIAL_8N1, 32, 26) to communicate with another device.
I know that this device is working, i have tested it with master module.
I have also switche TX and RX ports. Still no respond from the slave.So i was wondering, is it possible to use Serial1 on M5atom lite with the 32 and 26 ports?
Thanks -
Hello @HappyUser
have you tried directly looping back TX into RX? E.g. connect G26 to G32? Then try withsomething like this in the
loop():static uint32_t lastTime = 0; if(millis() - lastTime > 5000) { lastTime = millis(); Serial1.println("hello"); } if(Serial1.available() > 0) { while(Serial1.available() > 0) { Serial.print(Serial1.readStringUntil('\n')); } Serial.println(); }Thanks
Felix -
@felmue said in M5stack GPS, use Serial2 and Serial1:
Well, now i need to recheck what i have been doing.
Your example works both on M5Stick (using ports 0 and 26) and M5Atom (ports 26 and 32).Thank you, i have some work to do, Ha Ha
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