Complete library for whole scientific pre-final
Dependencies: BOX_1
Diff: ENVIROMENTAL/ENVIROMENTAL.h
- Revision:
- 0:f8a9cceb4186
- Child:
- 3:7c5d4da549ce
diff -r 000000000000 -r f8a9cceb4186 ENVIROMENTAL/ENVIROMENTAL.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ENVIROMENTAL/ENVIROMENTAL.h Mon Jun 10 12:50:02 2019 +0000 @@ -0,0 +1,41 @@ +#ifndef ENVIROMENTAL_H +#define ENVIROMENTAL_H + +#include "mbed.h" +#include "BME280.h" +#include "SI7021.h" +#include "VEML6070.h" +//#include "TSL2561.h" //Lacks library + + +class ENVIROMENTAL +{ +public: + ENVIROMENTAL(PinName envi_SDA, PinName envi_SCL,PinName mq_analog); + float get_temp(); //return temperature from SI7021 + uint32_t get_humidity(); //return humidity from SI7021 + int32_t get_pressure(); //return pressure in Pa from MBP280 + float get_CO(); //return CO from mq-7 + int get_lux(); //return lux from TSL2561 + void calibrate_mq(); //run only once in clean air + int get_uv(); //return uv intensity from VEML6070 + +virtual ~ENVIROMENTAL(); + + + +private: + +PinName _pinSCL; +PinName _pinSDA; +PinName _mq_pin; +float _tmp; +//TSL2561 lux; +BME280 bmp; +SI7021 climate; +I2C i2c; +VEML6070 uv; + +}; + +#endif