[Arduino UNO]Receive Serial Data from multiple sources I have the following system:



As a master, I have an Arduino UNO Chip, more specifically an Atmel MEGA328P. The important thing is that this microcontroller has only one hardware Serial port, and that port is used to communicate with a WiFi adapter. 

The problem I'm facing with is that I want to receive data from a Compass and a GPS modules. Booth send data via Serial protocol. The 328p Chip have only one serial which is busy!

I can't use SoftwareSerial as I don't want any delay on master board!
I can't also use Arduino Mega2560 which have 3 Serial ports as its sizes are too big.

So there are are my approaches:


Using MCP4725 I2C DAC for Compass, but what we do with GPS?
Using and intermediate Arduino UNO Chip?
On that chip I could use Software serial but how to transfer data to MASTER using only digital and analogic pins? Maybe using 10 pins to implement a parallel transfer?
Perhaps there is possible to convert Compass and GPS data to analogic then transfer to MASTER?


Anyway, what possibilities would I have to play around?
This answer summarizes the possibilities:

1) HardwareSerial is always best.  You are using that for WiFi.

2) AltSoftSerial is the best software serial library, but it requires pins 8 &amp; 9.  Very efficient and non-blocking!  Strongly recommended for the GPS connection.

3) NeoSWSerial is next best, but it supports only 9600, 19200 and 38400.  It is non-blocking on receive, so it could be used for the GPS connection.

4) SoftwareSerial is the worst.  :P  Not suitable for the GPS connection, as you have discovered.

I'll also mention my GPS library, NeoGPS.  It is smaller and faster than other libraries, and there are examples that show how to make it run during the RX character interrupt, saving even more time.  It can also be configured for just the messages and fields that you actually use, saving RAM, program space and execution time.