¡Qué majo es Ander Ibabe!

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
carlospomar
Date:
Thu Jan 18 22:17:31 2018 +0000
Parent:
6:93c85e86afad
Child:
8:ddee54b61dc5
Commit message:
asdf

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jan 12 17:26:45 2018 +0000
+++ b/main.cpp	Thu Jan 18 22:17:31 2018 +0000
@@ -7,6 +7,7 @@
 #define dato_i  9.7128 //((3,3*2000/(2^16*Rburn))^2)*(1/100)
 #define dato_p 202.6327
 #define dato_e 0.02/3600000.0 //diferencia de tiempo entre muestras en segundos 
+#define dato_pr 0,12143 // precio €/kWh
 uint16_t VirtAddVarTab[NB_OF_VAR] = {0x5555, 0x6666, 0x7777};
 
 
@@ -190,7 +191,7 @@
             EnergiaActiva=EnergiaActiva+PotenciaActiva*dato_e;
             EnergiaReactiva=EnergiaReactiva+PotenciaReactiva*dato_e;
             FactorPotencia=PotenciaActiva/PotenciaAparente;
-            precio=EnergiaActiva*dato_p;
+            precio=EnergiaActiva*dato_pr;
         }
     }
 }    
\ No newline at end of file