Étape 4: Sortie série
Nous pouvons maintenant générer les résultats des calculs sur le port série en utilisant le code suivant :
Serial.Print (« Volts = ") ;
Serial.Print(batteryVoltage) ;
Serial.Print ("\t courant (ampères) =") ;
Serial.Print(AMPS) ;
Serial.Print ("\t puissance (Watts) =") ;
Serial.Print(watts) ;
Serial.Print ("\t temps (heures) =") ;
Serial.Print(Time/3600) ;
Serial.Print ("\t ampères-heures (ah) =") ;
Serial.Print(ampHours) ;
Serial.Print ("\t wattheures (wh) =") ;
Serial.println(wattHours) ;