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.
Diff: Multichannel_Gas_GMXXX.h
- Revision:
- 8:705631dd7248
- Parent:
- 7:3405d48c39bd
- Child:
- 9:07c1751a6d00
--- a/Multichannel_Gas_GMXXX.h Fri Feb 19 12:50:02 2021 +0100
+++ b/Multichannel_Gas_GMXXX.h Tue Mar 02 18:29:08 2021 +0100
@@ -46,7 +46,6 @@
public:
GAS_GMXXX(PinName sda, PinName scl, uint8_t addr = 0x08);
GAS_GMXXX(I2C* i2c, uint8_t addr = 0x08);
- //void begin();
void init();
void setAddress(uint8_t address = 0x08);
void preheated();
@@ -82,10 +81,20 @@
{
return (adc * 3.3) / GM_RESOLUTION;
};
+ void read();
+ bool gas_detected();
+ uint32_t get_no2();
+ uint32_t get_c2h5oh();
+ uint32_t get_voc();
+ uint32_t get_co();
private:
I2C* _i2c_p;
I2C& _i2c;
+
+ uint32_t _no2, _c2h5oh, _voc, _co;
+
bool isPreheated;
+ bool gasDetected;
uint8_t GMXXX_ADDRESS;
void GMXXXWriteByte(uint8_t cmd);
uint32_t GMXXXRead32();