DHT22 tester (p21) (p22) 4,7kR pullup

Dependencies:   mbed

Fork of Solar by Skovbrynet

Revision:
3:ae94f568bde5
Parent:
2:a347938f640b
Child:
4:e2c50e38f7e0
--- a/main.cpp	Tue Mar 08 20:48:12 2016 +0000
+++ b/main.cpp	Tue Mar 08 20:52:15 2016 +0000
@@ -1,6 +1,7 @@
-#include "mbed.h",
+#include "mbed.h"
 #include "TextLCD.h"
 #include "DHT.h"
+#include "BH1750.h"
 
 #define VoltDevider 16.0*3.3 // --- Voltade devider Solar Cell --1k--|---15k--- 50V "V"
 #define VoltBatDevider 9.2*3.3 // --- Voltade devider Battery --1k--|---8.2k--- 30V "V"
@@ -31,6 +32,7 @@
 
 float VRaw; //This will store our raw ADC data
 float IRaw;
+float IRaw1;
 
 float UdeTemp;
 float UdeHym;
@@ -91,7 +93,7 @@
             lcd.cls();
             lcd.printf("Solar Cell:\n");
             lcd.printf("C1 %.1f C2 %.1f\n C3 %.1f C4 %.1f\n",Cells[0],Cells[1],Cells[2],Cells[3]);
-            lcd.printf("%.1fV %.1fA %.1fW\n",Cell[2],IRaw1,IRaw1*Cell[2]);
+            lcd.printf("%.1fV %.1fA %.1fW\n",Cells[2],IRaw1,IRaw1*Cells[2]);
         }
         break;
 
@@ -131,7 +133,7 @@
         pc.printf("Inde %.2fC Ude: %.2fC %.1f% \n\r",ReadTempetur(),UdeTemp,UdeHym);
         pc.printf("Solar Cell:\r\n");
         pc.printf("C1 %.1f C2 %.1f C3 %.1f C4 %.1f \n\n\r",Cells[0],Cells[1],Cells[2],Cells[3]);
-        pc.printf("%.3f Volt %.3f Amp %.3f Watt\r\n",Cell[2],IRaw1,IRaw1*Cell[2]);
+        pc.printf("%.3f Volt %.3f Amp %.3f Watt\r\n",Cells[2],IRaw1,IRaw1*Cells[2]);
         pc.printf("Illuminance: %+7.2f [Lux]\r\n", lum.lux());