sensor lib
Dependents: gather_sensor_data
Diff: MQ135Sensor.h
- Revision:
- 0:cbe8cd32b8d9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MQ135Sensor.h Thu Sep 08 14:05:15 2016 +0000 @@ -0,0 +1,25 @@ +#ifndef MBED_MQ135_SENSOR_H +#define MBED_MQ135_SENSOR_H + +#include "mbed.h" +#include <string> +#include "MQ135.h" +#include "sensorTypes.h" + + +class MQ135Sensor { + +public: + MQ135Sensor(PinName analog_out_pin_name); + + sensorStatus readSensor(string &sensor_reading); + sensorStatus setReadingType(sensorReadingType sensor_reading_types = MQ135_ALL); + sensorReadingType getReadingType(); + +private: + PinName analog_out_pname; + MQ135 MQ135_sensor; + sensorReadingType reading_type; +}; + +#endif \ No newline at end of file