Driver for Me gas snesor device.
More...
#include <src/MeGasSensor.h>
Driver for Me gas snesor device.
Class: MeGasSensor
- Description
- Declaration of Class MeGasSensor
- Copyright (C), 2012-2016, MakeBlock
◆ MeGasSensor() [1/2]
| MeGasSensor::MeGasSensor |
( |
void |
| ) |
|
Alternate Constructor which can call your own function to map the gas snesor to arduino port, no pins are used or initialized here.
- Parameters
-
◆ MeGasSensor() [2/2]
| MeGasSensor::MeGasSensor |
( |
uint8_t |
port | ) |
|
Alternate Constructor which can call your own function to map the gas snesor to arduino port
- Parameters
-
| [in] | port | - RJ25 port from PORT_1 to M2 |
◆ readAnalog()
| int16_t MeGasSensor::readAnalog |
( |
void |
| ) |
|
- Function
- readAnalog
- Description
- Read the analog signal of gas snesor.
- Output
- None
- Returns
- The vlaue from gas snesor's analog output
- Others
- None
◆ readDigital()
| uint8_t MeGasSensor::readDigital |
( |
void |
| ) |
|
- Function
- readDigital
- Description
- Read the digital signal of gas snesor, It is the result of comparison between the threshold value and the analog output. The threshold value can be adjusted using a rheostat
- Output
- None
- Returns
- true - The gas concentration exceeds
false - The concentration of the gas in the range
- Others
- None
◆ setpin()
| void MeGasSensor::setpin |
( |
uint8_t |
digital_pin, |
|
|
uint8_t |
analog_pin |
|
) |
| |
- Function
- setpin
- Description
- Reset the gas snesor available PIN by its arduino port.
- Parameters
-
| [in] | digital_pin | - arduino port for digital signal input |
| [in] | analog_pin | - arduino port for analog signal input |
- Output
- None
- Returns
- None
- Others
- None
The documentation for this class was generated from the following files: