Proyect

Dependencies:   mbed BH1750

Files at this revision

API Documentation at this revision

Comitter:
junmorenodi
Date:
Fri Jul 05 13:36:32 2019 +0000
Commit message:
1

Changed in this revision

BH1750.lib Show annotated file Show diff for this revision Revisions of this file
Main/main.cpp Show annotated file Show diff for this revision Revisions of this file
PWM.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 8e048063034d BH1750.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/BH1750.lib	Fri Jul 05 13:36:32 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/vrabec/code/BH1750/#58ee8a917618
diff -r 000000000000 -r 8e048063034d Main/main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Main/main.cpp	Fri Jul 05 13:36:32 2019 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "BH1750.h"
+
+//BH1750  lightSensor(I2C_SDA, I2C_SCL);
+BH1750  lightSensor(PB_9, PB_8);
+Serial pc(SERIAL_TX, SERIAL_RX);
+
+//PwmOut mypwm1(PC_8);
+
+int main() 
+{
+   lightSensor.init();
+  
+  //  mypwm1.period_ms(10);
+  // mypwm1.pulsewidth_ms(5);
+
+   while(1) {
+       pc.printf("Light intensity: %.4f Lux\r\n", lightSensor.readIntesity());
+       wait(5);
+   }
+}
diff -r 000000000000 -r 8e048063034d PWM.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PWM.lib	Fri Jul 05 13:36:32 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/junmorenodi/code/PWM/#52663cc4ecde
diff -r 000000000000 -r 8e048063034d mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jul 05 13:36:32 2019 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400
\ No newline at end of file