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: BOX_1
ENVIROMENTAL.h
00001 #ifndef ENVIROMENTAL_H 00002 #define ENVIROMENTAL_H 00003 #include "TSL2561.h" 00004 #include "mbed.h" 00005 #include "BME280.h" 00006 #include "SI7021.h" 00007 #include "VEML6070.h" 00008 00009 00010 class ENVIROMENTAL 00011 { 00012 public: 00013 ENVIROMENTAL(PinName envi_SDA, PinName envi_SCL,PinName mq_analog,I2C &i2c); 00014 float get_temp(); //return temperature from SI7021 00015 uint32_t get_humidity(); //return humidity from SI7021 00016 int32_t get_pressure(); //return pressure in Pa from MBP280 00017 float get_CO(); //return CO from mq-7 00018 int get_lumen(); //return visible lumen from TSL2561 00019 int get_infrared(); //return infrared lumen from TSL2561 00020 void calibrate_mq(); //run only once in clean air 00021 int get_uv(); //return uv intensity from VEML6070 00022 00023 00024 virtual ~ENVIROMENTAL(); 00025 00026 00027 00028 private: 00029 00030 PinName _pinSCL; 00031 PinName _pinSDA; 00032 PinName _mq_pin; 00033 float _tmp; 00034 TSL2561 lux; 00035 BME280 bmp; 00036 SI7021 climate; 00037 VEML6070 uv; 00038 00039 }; 00040 00041 #endif
Generated on Sat Jul 16 2022 00:45:31 by
 1.7.2