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.
main.cpp
00001 #include "mbed.h" 00002 #include "TSL2591.h" 00003 #include "BME280.h" 00004 00005 I2C i2c1(I2C_SDA, I2C_SCL); 00006 BME280 sensor(i2c1, BME280_ADDR_L); 00007 TSL2591 sensor1(i2c1, TSL2591_ADDR); 00008 00009 int main() 00010 { 00011 sensor.init(); 00012 while(1) { 00013 sensor1.getALS(); 00014 sensor1.calcLux(); 00015 printf("%d \t %d \t %d \t %d\n",sensor1.full,sensor1.ir,(int16_t)sensor1.visible,sensor1.lux); 00016 printf("%2.2f degC, %04.2f hPa, %2.2f %%\n", sensor.getTemperature(), sensor.getPressure(), sensor.getHumidity()); 00017 wait(1); 00018 } 00019 }
Generated on Sun Jul 17 2022 18:52:39 by
1.7.2