Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Fork of Solar by
Revision 3:ae94f568bde5, committed 2016-03-08
- Comitter:
- Tuxitheone
- Date:
- Tue Mar 08 20:52:15 2016 +0000
- Parent:
- 2:a347938f640b
- Child:
- 4:e2c50e38f7e0
- Commit message:
- ?ndret lidt forsk?lligt
Changed in this revision
| BH1750.lib | Show annotated file Show diff for this revision Revisions of this file |
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BH1750.lib Tue Mar 08 20:52:15 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/kenjiArai/code/BH1750/#d95f6ac4c8d6
--- 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());
