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 _BLEDEVICECOUNTER_H_ | |
#define _BLEDEVICECOUNTER_H_ | |
#include <SinricProDevice.h> | |
#include <Capabilities/RangeController.h> | |
class BLEDeviceCounter | |
: public SinricProDevice | |
, public RangeController<BLEDeviceCounter> { | |
friend class RangeController<BLEDeviceCounter>; |
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 <Arduino.h> | |
#include "MotorEncoder.h" | |
MotorEncoder::MotorEncoder(int motorPinA, int MotorPinB, int encoderPin) | |
: motorPinA(motorPinA) | |
, motorPinB(motorPinB) | |
, encoderPin(encoderPin) { | |
pinMode(motorPinA, OUTPUT); | |
pinMode(motorPinB, OUTPUT); | |
pinMode(encoderPin, INPUT); |
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 <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <SinricPro.h> | |
#include <SinricProLight.h> | |
#include <map> | |
#define WIFI_SSID "YOUR-WIFI-SSID" | |
#define WIFI_PASS "YOUR-WIFI-PASS" | |
#define APP_KEY "YOUR-APPKEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" |
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 <Arduino.h> | |
#include <map> | |
using KbdLayout = std::map<uint8_t, uint8_t>; | |
// standard US layout | |
#define SHIFT 0x80 | |
KbdLayout std_layout{ | |
{0x08, 0x2a}, // BS Backspace | |
{0x09, 0x2b}, // TAB Tab |
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
/* | |
* Required libraries and their dependencies: | |
* | |
* SinricPro (https://github.com/sinricpro/esp8266-esp32-sdk) | |
* -> WebSockets (https://github.com/Links2004/arduinoWebSockets) | |
* -> ArduinoJson (https://github.com/bblanchon/ArduinoJson) | |
* | |
* ESP32-NimBLE-Keyboard (https://github.com/sivar2311/ESP32-NimBLE-Keyboard) | |
* -> NimBLE-Arduino (https://github.com/h2zero/NimBLE-Arduino) | |
*/ |
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 _DIMMERSENSOR_H_ | |
#define _DIMMERSENSOR_H_ | |
#include <SinricProDevice.h> | |
#include <Capabilities/RangeController.h> | |
#include <Capabilities/ContactSensor.h> | |
class DimmerSensor | |
: public SinricProDevice | |
, public RangeController<DimmerSensor> |
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
#define SSID "WIFI_SSID" | |
#define PASS "WIFI_PASS" | |
#define MQTT_SERVER "MQTT-SERVER-ADDRESS" | |
#define MQTT_PORT 1883 | |
#define MQTT_USERNAME "MQTT-USER-NAME" | |
#define MQTT_KEY "MQTT-KEY" | |
#define MQTT_TOPIC "MQTT-TOPIC" | |
#define APP_KEY "SINRIC-PRO-APPKEY" |
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 "credentials.h" | |
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include "lm75.h" | |
#include "SinricPro.h" | |
#include "SinricProThermostat.h" | |
#include "EEPROM.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
#include <Arduino.h> | |
#include <ESP8266WiFi.h> | |
#include <ArduinoOTA.h> | |
#include "logger.h" | |
Logger logger; | |
#define ENABLE_DEBUG | |
#ifdef ENABLE_DEBUG |
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 "SinricPro.h" | |
#include "SinricProSwitch.h" | |
#define WIFI_SSID "YOUR-WIFI-SSID" | |
#define WIFI_PASS "YOUR-WIFI-PASS" | |
#define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx" | |
#define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx" | |
#define SWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx" | |
#define BAUD_RATE 9600 // Change baudrate to your need |
NewerOlder