TwoPortRX ...but with multiple software serial and a hardware serial

A quick update...

Well, I decided that I could do without my thermostat for a few hours and give this a go with a Mega, however without success. It seems there's a conflict with the tinyGPS library somewhere - all was working well on multiple serial ports until I started calling the gps functions.

I then switched to working with two adjacent Nanos.

Nano #1
Essentially loaded with the BrainSerial example

// Arduino Brain Library
// Serial out example, 	grabs the brain data and sends CSV out over the hardware serial.
// Eric Mika, 2010

#include <Brain.h>

// Set up the brain parser, pass it the hardware serial object you want to listen on.
Brain brain(Serial);


void setup() {
  // Start the hardware serial.
  Serial.begin(9600);
}

void loop() {
  if (brain.update()) {
    //Serial.println(brain.readErrors());
    Serial.print(brain.readCSV());
  }

}

As well as being connected to the brain thing, this board shares a common ground with Nano #2 and has wires between its hardware RX and TX pins going to SoftwareSerial pins on Nano #2.

Nano #2
Receives the brain csv data from the first Nano over a SoftwareSerial connection. Each time this data comes in it appends data from the GPS and is currently displaying some of this on an OLED display:

#include <SoftwareSerial.h>
#include <TinyGPS.h>  // includes the TinyGPS library

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

TinyGPS gps;
SoftwareSerial gpsmodule(5, 6);
SoftwareSerial brainIn(2, 3); // RX, TX

//define GPS variables 

float flat, flon; // +/- latitude/longitude in degrees
unsigned long date, time, age; // what they say on the tin
long lat, lon; // +/- lat/long in 100000ths of a degree


#define OLED_DC 11
#define OLED_CS 12
#define OLED_CLK 10
#define OLED_MOSI 9
#define OLED_RESET 13
Adafruit_SSD1306 display(OLED_MOSI, OLED_CLK, OLED_DC, OLED_RESET, OLED_CS);

#if (SSD1306_LCDHEIGHT != 32)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");
#endif

void setup()  {
  gpsmodule.begin(4800); // serial communication between the gps module and the microcontroller
  Serial.begin(9600); //connection to host computer
  brainIn.begin(9600);    //connection to arduino parsing the brain data

  // by default, we'll generate the high voltage from the 3.3v line internally! (neat!)
  display.begin(SSD1306_SWITCHCAPVCC);
  // init done


  display.clearDisplay();   // clears the screen and buffer

}

void loop()                     
{

  getGPS(); // get GPS data


  brainIn.listen();

  //give some time for data to come in on the brainIn port
  for (unsigned long start = millis(); millis() - start < 1000;)
  {
  }
  if (brainIn.available()){
    while (brainIn.available())
    {
      Serial.print((char)brainIn.read());  //grab avail data from brain parsing arduino
    }
    Serial.print(",");

    Serial.print(flon, 6); //print lat and lon coordinates
    Serial.print(","); 
    Serial.print(flat, 6); 
    Serial.print(","); 
    Serial.print(date); 
    Serial.print(","); 
    Serial.println(time); 

    display.clearDisplay();   // clears the screen and buffer
    display.setTextSize(1);
    display.setTextColor(WHITE);
    display.setCursor(0,0);
    display.println(time);

    display.setCursor(0,10);
    display.print(flon, 6);
    display.print(", ");
    display.println(flat, 6);

    display.setCursor(0,20);
    display.print(flon, 6);
    display.print(", ");
    display.println(flat, 6);

    display.display();


  }

} //end loop


void getGPS(){
  gpsmodule.listen();
  bool newData = false;
  unsigned long chars;
  unsigned short sentences, failed;
  while (newData == false){
    // For one second we parse GPS data and report some key values
    for (unsigned long start = millis(); millis() - start < 1000;)
    {
      while (gpsmodule.available())
      {
        char c = gpsmodule.read();
        // Serial.write(c); // uncomment this line if you want to see the GPS data flowing
        if (gps.encode(c)) // Did a new valid sentence come in?
          newData = true;
      }
    }

    if (newData)
    {
      gps.get_datetime(&date, &time, &age); // time in hhmmsscc and date in ddmmyy formats

      gps.f_get_position(&flat, &flon, &age);  // latitude and longitude values with a decimal point eg 54.117769


    } //end newData
  }

} //end getGPS

I've not added in the logger yet, but it seems reasonably stable printing to the serial monitor, although there's occasional ingress of garbled characters.

I'd like to be able to print the first 3 values in the comma separated list coming through from the brain thing onto the OLED screen. Typically something like : "0, 23, 85" (The first is a measure of quality of connection, max value 200; and the others are measures of 'concentration' and 'meditation', max values 100)

Would I be right in thinking the way to approach this would involve putting the arriving characters into a buffer array as they arrive so I can then split it into variables and later use them to print out?