Juan Moreno
/
SmartLights
Proyect
Revision 0:8e048063034d, committed 2019-07-05
- Comitter:
- junmorenodi
- Date:
- Fri Jul 05 13:36:32 2019 +0000
- Commit message:
- 1
Changed in this revision
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