This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Gas Sensor", | |
"description": "Gas Sensor", | |
"deviceTypeId": "654d7ef928f14e9ac82ad57d", | |
"capabilities": [ | |
{ | |
"id": "5ff0b41b994fd31b7d5e8961", | |
"mode": { | |
"instanceId": "modeInstance1", | |
"locale": "en-US", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(ESP8266) | |
const int adcPin = A0; | |
#elif defined(ESP32) | |
const int adcPin = 34; | |
#elif defined(ARDUINO_ARCH_RP2040) | |
const int adcPin = 26; | |
#endif | |
int sensorVal; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _AIRQUALITYSENSOR_H_ | |
#define _AIRQUALITYSENSOR_H_ | |
#include <SinricProDevice.h> | |
#include <Capabilities/ModeController.h> | |
#include <Capabilities/RangeController.h> | |
#include <Capabilities/PushNotification.h> | |
class AirQualitySensor | |
: public SinricProDevice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "Air Quality Sensor", | |
"description": "Air Quality Sensor", | |
"deviceTypeId": "5ff0b112994fd31b7d5e8065", | |
"capabilities": [ | |
{ | |
"id": "5ff0b41b994fd31b7d5e8961", | |
"mode": { | |
"instanceId": "modeInstance1", | |
"locale": "en-US", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TroykaMQ.h> // https://github.com/amperka/TroykaMQ | |
#if defined(ESP8266) | |
#define SENSOR_PIN A0 | |
#elif defined(ESP32) | |
#define SENSOR_PIN 34 | |
#endif | |
MQ135 mq135(SENSOR_PIN); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <TroykaMQ.h> // https://github.com/amperka/TroykaMQ | |
#if defined(ESP8266) | |
#define SENSOR_PIN A0 | |
#elif defined(ESP32) | |
#define SENSOR_PIN 34 | |
#endif | |
MQ135 mq135(SENSOR_PIN); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Uncomment the following line to enable serial debug output | |
//#define ENABLE_DEBUG | |
#ifdef ENABLE_DEBUG | |
#define DEBUG_ESP_PORT Serial | |
#define NODEBUG_WEBSOCKETS | |
#define NDEBUG | |
#endif | |
#include <Arduino.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(ESP8266) | |
const int sPin = A0; | |
const int vccPin = D2; | |
#elif defined(ESP32) | |
const int sPin = 34; | |
const int vccPin = 17; | |
#elif defined(ARDUINO_ARCH_RP2040) | |
const int sPin = 26; | |
const int vccPin = 6; | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if defined(ESP8266) | |
const int sPin = A0; | |
const int vccPin = D2; | |
#elif defined(ESP32) | |
const int sPin = 34; | |
const int vccPin = 17; | |
#elif defined(ARDUINO_ARCH_RP2040) | |
const int sPin = 26; | |
const int vccPin = 6; | |
#endif |