Tasmota/lib/Mutichannel_Gas_Sensor/examples/GetVersion/GetVersion.ino

20 lines
390 B
Arduino
Raw Normal View History

// 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
}