Structure 2xSerial et 3xI2C

Bonjour,

J'ai besoin de votre aide, je débute mon premier vrai projet sous arduino et vos conseils seraient les bienvenues concernant la structure de mon programme ...

Mon projet:
1 Arduino Nano 3.0
1 écran Oled 4D (Serial)
1 Adafruit Ultimate GPS (Serial)
1 Module 10 DOF ADA1604 ou BMP180 (I2C)
1 Adafruit RTC DS1307 (I2C)
1 Adafruit MicroSD (SPI je crois)

J'arrive à faire fonctionner tout ces éléments indépendamment mais j'ai beaucoup de mal à réaliser un code qui gère l'ensemble !

Voici mon code actuel sans le GPS et sans la micro SD:

/*********************************************************************************************/
/*********************************************************************************************/

#define DisplaySerial Serial
#include "Goldelox_Serial_4DLib.h"
#include "Goldelox_Const4D.h"
#define LOG_MESSAGES			// For debug only

#include <Wire.h>
#include <Adafruit_BMP085.h>
#include <RTClib.h>


/*********************************************************************************************/
//								LOG MESSAGE (DEBUG)
/*********************************************************************************************/
#ifdef LOG_MESSAGES
#define HWLOGGING Serial
#else
#define HWLOGGING if (1) {} else Serial
#endif

/*********************************************************************************************/
//								DECLARATION
/*********************************************************************************************/

const int temp = 0;
const float wind = 1;
RTC_Millis RTC;
Adafruit_BMP085 bmp;

Goldelox_Serial_4DLib Display(&DisplaySerial);

// SCREEN FONCTION
int fmediatests ;
// Adress declaration (display)
#define iiLeddigits1H 0x0000
#define iiLeddigits1L 0x1C00
#define iiLeddigits2H 0x0001
#define iiLeddigits2L 0x1000
#define iiLeddigits1H 0x0000
#define iiLeddigits1L 0x1C00
#define iLeddigits2H 0x0001
#define iLeddigits2L 0x1000
//....


/* ------------------------------------------------------------------------------------------*/
// 								Check SD card Diplay
/* ------------------------------------------------------------------------------------------*/
int trymount(void)
{
#define retries 15
int i ;
int j ;
i = Display.media_Init() ;
j = 0 ;
if (!i)
{
	Display.putstr("Pls insert uSD crd\n") ;
	while ( (!i)
	&& (j < retries) )
	{
	Display.putstr(".") ;
	i = Display.media_Init() ;
	j++ ;
	}
	Display.putstr("\n") ;
}
if (j == retries)
	return FALSE ;
else
	return TRUE ;
}

/* ------------------------------------------------------------------------------------------*/
// 								Send display data
/* ------------------------------------------------------------------------------------------*/
void SendScreen(void)
{
Display.gfx_Cls() ;
HWLOGGING.println(F("Send Screen")) ;


}

int digitstate[6];

void ledDigitsDisplay2(int iiLeddigitsH, int iiLeddigitsL, int newval, int Digits, int MinDigits, bool LeadingBlanks, byte left, byte top)
{

int i, k, l, lb ;

l = 1;

for(i = 1 ;i < Digits; i++)
{
    l *= 10;
}

lb = LeadingBlanks;

for(i = 0; i < Digits; i++)
{
    k = newval / l;
    newval -= k * l;

    if(lb && (i < Digits - MinDigits))
    {
        if(k == 0){
            k = -1 ;
        }
    else
    {
    lb = 0 ;
    }
}

l /= 10;

if (digitstate[i] != k)
{
Display.media_SetAdd(iiLeddigitsH, iiLeddigitsL);
Display.media_VideoFrame(left + (i * 15), top, k);
}

digitstate[i] = k;

}
  
}

/* ------------------------------------------------------------------------------------------*/
// 								Display error report
/* ------------------------------------------------------------------------------------------*/
void Callback(int ErrCode, unsigned char ErrByte)
{
#ifdef LOG_MESSAGES
	const char *Error4DText[] = {"OK\0", "Timeout\0", "NAK\0", "Length\0", "Invalid\0"} ;
	HWLOGGING.print(F("Serial 4D Library reports error ")) ;
	HWLOGGING.print(Error4DText[ErrCode]) ;
	if (ErrCode == Err4D_NAK)
	{
		HWLOGGING.print(F(" returned data= ")) ;
		HWLOGGING.println(ErrByte) ;
	}
	else
		HWLOGGING.println(F("")) ;
		while(1) ; // you can return here, or you can loop
#else
	// Pin 13 has an LED connected on most Arduino boards. Just give it a name
#define led 13
while(1)
{
	digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
	delay(200); // wait for a second
	digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
	delay(200); // wait for a second
}
#endif
}

/*********************************************************************************************/
/*********************************************************************************************/
/*								SETUP 														 */
/*********************************************************************************************/
/*********************************************************************************************/

void setup()
{

// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
//						Reset display 
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
  
//Reset the display, assuming Display is connected to Arduino via 4D Arduino Adaptor Shield
pinMode(2, OUTPUT); 		// D2 on Arduino resets the Display
digitalWrite(2, LOW); 		// Reset Display
delay(100); 				// 100ms Reset pulse
digitalWrite(2, HIGH); 		// Disable Reset
delay(5000);                // Wait a start

Display.TimeLimit4D = 5000 ; // 2 second timeout on all commands
Display.Callback4D = Callback ; // NULL ;


// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
//						Debug begin 
// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°

Serial.begin(9600);

#ifdef LOG_MESSAGES
	HWLOGGING.begin(9600);
	HWLOGGING.println(F("\n\Mode Debug\n"));
#else
	DisplaySerial.begin(9600) ;	//Instance Display
#endif

bmp.begin(); 					//Instance BMP180
Wire.begin();
RTC.begin();					//Instance RTC
//RTC.begin(DateTime(__DATE__, __TIME__)); //sets the RTC to the date & time this sketch was compiled
}


/*********************************************************************************************/
//										LOOP 
/*********************************************************************************************/
void loop()
{

#define mTime 200				// Delay

int mGear, mTmot, mTamb, mPatmo, mAltit, mTrip, mTimeHH, mTimeMM, nScreen ;


/*********************************** BMP180 ***********************************/
mTamb = bmp.readTemperature();
mPatmo = bmp.readPressure();
mAltit = bmp.readAltitude();

/*********************************** RTC ***********************************/
DateTime now = RTC.now();
mTimeHH = now.hour();
mTimeMM = now.minute();



#ifdef LOG_MESSAGES
	HWLOGGING.println(bmp.readTemperature());		// Température en °C
	HWLOGGING.println(bmp.readPressure());			// Pression en Pascal (Pa)
	HWLOGGING.println(bmp.readAltitude()); 		// Altitude en mètres
	HWLOGGING.println(now.hour());
	HWLOGGING.println(now.minute());
	
#else
	// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
	//						Update display media
	// °°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
	Display.TimeLimit4D   = 5000 ; // 2 second timeout on all commands
	//Display.Callback4D = Callback ; // NULL ;

	ledDigitsDisplay2(iiLeddigits1H, iiLeddigits1L, 1,1,0,true,56,36);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits1H, iiLeddigits1L, 6,1,0,true,56,36);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits2H, iiLeddigits2L, 1223,4,0,true,0,96);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits3H, iiLeddigits3L, 815,3,0,true,112,96);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits4H, iiLeddigits4L, 11,2,2,true,0,4);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits5H, iiLeddigits5L, 15,2,2,true,36,4);
	delay(mTime);

	ledDigitsDisplay2(iiLeddigits6H, iiLeddigits6L, 213,3,0,true,112,4);
	delay(mTime);

#endif



delay(200);



	
}

Je pense que je devrais essayer de tester les connections pour éviter les erreurs ... Mais comment procéder ?
Autre chose, utilisant déjà la connexion Serial (pin 0 et 1) pour mon écran, je peux utiliser "SoftwareSerial" avec "SoftwareSerial portOne(10,11);" ?

Je confirme, l'utilisation "SoftwareSerial" fonctionne me permettant d'utiliser une deuxième connexion série ...

Par contre une fois encore indépendamment tout fonctionne mais dès que j'essaye ajouter le premier I2C, mes connexion série ne fonctionne plus ... Avez vous une idée ?

Merci.