GPS + GSM
-
hi, is possible to connect GPS module and GSM at the same time?
-
@richardmike4 Hi Richard,
Some modules use the same GPIO - in this case only one module can be actively used at a time.
The GPS and SIM modules use the same GPIO - the GPS continually sends data - so at least for the time being it should not be used in the stack at the same time as GSM module.
-
@jimit 在 GPS + GSM 中说:
@richardmike4 Hi Richard,
Some modules use the same GPIO - in this case only one module can be actively used at a time.
It would be a good idea to add some jumpers on such modules to select the communication pins.
There is plenty of space on the board for that purpose.For example, GPS & GSM modules, apart from the fact that they cannot be used at the same time, are completely unusable on M5Stack with psRAM on which pins 16&17 are used to access psRAM.
-
Thnx, i think it´s possible to use an arduino for gps (serial) and communicate this by i2C to the m5stack, what do you think?
-
Default the GPS and GSM modules are partially disconnected from the M5Stack bus.
You must bridge the contact areas for connection.
The GSM module has not alternatives for connection. It uses GPIO16 and 17 for UART and GPIO5 for reset.
The GPS module has alternative connections. 16&17 or 1&3 or 5&13 for UART. If you d'not need a PPS-signal, you can not bridge it at all.
BUT.
GPIO 1&3 is used USB-UART (CP2104).
I d'not know how to use GPIO 5&13 like a UART. This is not a typical application for ESP32. -
You can use hardwareSerial to assign (ex)Serial1 and Serial2 to different pin's then use Serial1 and Serial2 to communicate with the GSM and GPS
HardwareSerial Serial1;
Serial1.begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=x, int8_t txPin=y, bool invert=false);Just an ideea...