Complete library for whole scientific

Dependencies:   BOX_1

ENVIROMENTAL/ENVIROMENTAL.h

Committer:
Alessio_Zaino
Date:
2019-06-10
Revision:
1:dda01a024d6c
Parent:
0:f8a9cceb4186

File content as of revision 1:dda01a024d6c:

#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