How many serial devices can be connected to a Particle Photon 2 at once and which pins are used for what? It is my understanding that the Photon 2 is able to handle Serial1, Serial2 and Serial3, apart from Serial that comes from the USB port. But I could not find any example with a Photon 2 connected to more than one serial device. I found some documentation about the original Photon where there needed to be some hacking to use Serial2 because it was connected to the status LED.
To give some context, my plan is to have a Photon 2 connected to a NEO6M GPS module through Serial1 and connected to a ELM327 through a USB to UART converter connected to Serial2. Is this possible out of the box or do I need do some modifications to micro controller like what used to be done to the original Photon? Do I need to use some special SoftwareSerial libraries to use anything beyond Serial1? Examples for the Photon 2 appear to be very scarce....or I am simply bad at asking Google the right questions.
There are three hardware UARTs on the Photon 2. You can use all three at the same time using the pins in the datasheet and the appropriate object Serial1, Serial2, and Serial3. They can use different settings such as baud rate if desired.
You absolutely cannot use software serial (or software SPI) on the Photon 2, P2, and M-SoM. If you need more than 3 serial ports you should use a SPI or I2C UART such as a SC16IS740.
They are all 3.3V TTL UARTs; if you have something that uses 5V, RS232, RS485, etc. you'd need appropriate level shifter/line drivers for those.
Thanks for the quick reply. 3 serial ports are more than enough so it is good to know that I don't need to use software serial.
I am also glad you mentioned 5V TTL thing since I was going to make a big mistake by using a TTL 5V adapter. So I kept looking and found this, but I am not sure if it solves the problem. I can't see what kind of levels it has. Can you help?