Tasmota/lib/Mutichannel_Gas_Sensor/examples/GetVersion/GetVersion.ino
arendst 77be56363a v5.12.0b
5.12.0b
 * Add Multichannel Gas sensor using MultiChannel_Gas_Sensor
library (#1245)
2018-02-18 18:39:28 +01:00

20 lines
390 B
C++

// Get firmware version of Grove Multichannel Gas Sensor
#include <Wire.h>
#include "MutichannelGasSensor.h"
#define SENSOR_ADDR 0X04 // default to 0x04
void setup()
{
Serial.begin(115200);
gas.begin(SENSOR_ADDR);
unsigned char version = gas.getVersion();
Serial.print("Version = ");
Serial.println(version);
}
void loop()
{
// nothing to do
}