 
 	gw.present( CHILD_ID_HHPHC, S_POWER );
 }
-
-/*
-void readBatteryLevel( MySensor &mygw ) {
-	static int oldBatteryPcnt = 0;
-
-	// get the battery Voltage
-	int sensorValue = analogRead( BATTERY_SENSE_PIN );
-
-#ifdef DEBUG_ENABLED
-	Serial.print( F("Sensor Value: ") );
-	Serial.println(sensorValue);
-#endif
-
-	float batteryV = sensorValue * VDIV;
-
-#ifdef DEBUG_ENABLED
-	Serial.print( F("Battery Voltage: ") );
-	Serial.print( batteryV );
-	Serial.println( F(" V") );
-#endif
-
-	int batteryPcnt = batteryV * 100 / BATTERY_VOLTAGE;
-	if (batteryPcnt > 100)
-		batteryPcnt = 100;
-
-#ifdef DEBUG_ENABLED
-	Serial.print( F("Battery percent: ") );
-	Serial.print(batteryPcnt);
-	Serial.println( F(" %") );
-#endif
-
-	if ( oldBatteryPcnt != batteryPcnt ) {
-		// Power up radio after sleep
-		mygw.sendBatteryLevel( batteryPcnt );
-		oldBatteryPcnt = batteryPcnt;
-	}
-}
-*/
 
 typedef struct TeleInfo TeleInfo;
 struct TeleInfo {


	tiSerial.begin( 1200 );

	// use the 1.1 V internal reference
	analogReference( INTERNAL );

	gw.begin();
	gw.sendSketchInfo( "Teleinfo Sensor", "0.1" );

	gw.present( CHILD_ID_ADCO, S_POWER );
	gw.present( CHILD_ID_OPTARIF, S_POWER );

}

void loop() {
	getTI();

	// attendre avant prochaine lecture
