 int fpC(int i, char cOrdre);
 
 unsigned int delestageEnCours = 1;
-unsigned int nbDelestage = 0;
+int nbDelestage = 0;
 
 // Téléinfo
 TeleInfo ti; // objet téléinfo
 char c; // pour stocker un caractère reçu sur le port série
 bool trameComplete = false;
-unsigned int mypApp = TELEINFO_UINT_INVALIDE;
-unsigned int myiInst = TELEINFO_UINT_INVALIDE;
-unsigned int myindexHC = TELEINFO_UINT_INVALIDE;
-unsigned int myindexHP = TELEINFO_UINT_INVALIDE;
+int mypApp = TELEINFO_UINT_INVALIDE;
+int myiInst = TELEINFO_UINT_INVALIDE;
+int myindexHC = TELEINFO_UINT_INVALIDE;
+int myindexHP = TELEINFO_UINT_INVALIDE;
 unsigned int myisousc = TELEINFO_UINT_INVALIDE; // pour calculer la limite de délestage
 float myDelestLimit = 0.0;
 boolean init_teleinfo = false;
 char etatFP[20] = "";
 
+
 void setup()
 {
   // == Fils pilotes ==
   initCdeFilsPilotes();
-  Spark.function("fp", fpControl);
-  Spark.function("setfp", setFP);
-  Spark.variable("nbdelest", &nbDelestage, INT);
-  Spark.variable("etatfp", &etatFP, STRING);
+  Particle.function("fp", fpControl);
+  Particle.function("setfp", setFP);
+  Particle.variable("nbdelest", nbDelestage);
+  Particle.variable("etatfp", etatFP);
    
   // == Téléinfo ==
-  Spark.variable("papp", &mypApp, INT);
-  Spark.variable("iinst", &myiInst, INT);
-  Spark.variable("indexhc", &myindexHC, INT);
-  Spark.variable("indexhp", &myindexHP, INT);
+  Particle.variable("papp", mypApp);
+  Particle.variable("iinst", myiInst);
+  Particle.variable("indexhc", myindexHC);
+  Particle.variable("indexhp", myindexHP);
   
   Serial.begin(115200); // Port série USB
   Serial1.begin(1200);  // Port série RX/TX

	}
	
	return;
}
// CAAAAAA => Tous OFF sauf le fil pilote 1

	unsigned int i;
	int returnValue = -1; // Init à -1 => Erreur
	
	command.trim();
