This file contains 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 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 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 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 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": "Flood Sensor", | |
"description": "Flood Sensor", | |
"deviceTypeId": "65335c897dc29736db4272d2", | |
"capabilities": [ | |
{ | |
"id": "5ff0b41b994fd31b7d5e8961", | |
"mode": { | |
"instanceId": "modeInstance1", | |
"locale": "en-US", |
This file contains 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 _FLOODSENSOR_H_ | |
#define _FLOODSENSOR_H_ | |
#include <SinricProDevice.h> | |
#include <Capabilities/ModeController.h> | |
#include <Capabilities/RangeController.h> | |
#include <Capabilities/PushNotification.h> | |
class FloodSensor | |
: public SinricProDevice |
This file contains 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 "max6675.h" // From https://github.com/adafruit/MAX6675-library | |
int CS0 = 11; // CS pin of MAX6675 | |
int SO = 12; // SO pin of MAX6675 | |
int SCK = 13; // SCK pin of MAX6675 | |
int units = 0; // Units to readout temp (0 = ÀöF, 1 = ÀöC) | |
float error = 0.0; // Temperature compensation error | |
MAX6675 temp0(CS0,SO,SCK,units,error); |
This file contains 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": "Water Level Indicator", | |
"description": "Water Level Indicator", | |
"deviceTypeId": "621b9648f728ec974aac62f2", | |
"capabilities": [ | |
{ | |
"id": "5ff0b45f994fd31b7d5e89c2", | |
"range": { | |
"instanceId": "rangeInstance1", | |
"locale": "en-US", |
This file contains 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 trigPin = 12; | |
const int echoPin = 14; | |
#elif defined(ESP32) | |
const int trigPin = 5; | |
const int echoPin = 18; | |
#elif defined(ARDUINO_ARCH_RP2040) | |
const int trigPin = 15; | |
const int echoPin = 14; | |
#endif |