Files
AHome/ESP_BigRoom/include/main.h

64 lines
1.2 KiB
C

#ifndef __MAIN__
#define __MAIN__
#include <Arduino.h>
//#include <ArduinoOTA.h>
#include <Ticker.h>
#include <WiFi.h>
#include <WiFiMulti.h>
extern "C" {
#include "freertos/FreeRTOS.h"
#include "freertos/timers.h"
}
#include <AsyncMqttClient.h>
#include <leds.h>
#include "MHZ19.h"
#include <Wire.h>
//#include "HTU21D.h"
#include <RunningMedian.h>
#include <Adafruit_HTU21DF.h>
#include <EEPROM.h>
#include <AsyncTCP.h>
#include <ESPAsyncWebServer.h>
#include <WebSerial.h>
#include <AsyncElegantOTA.h>
#define BAUDRATE 9600
#define LIGHT_SENS 36 //VP
#define MOVE_SENS 39 //VN
#define LED_WHITE 26 //25
#define PWM_WHITE 0
#define LED_BLUE 25 //26
#define PWM_BLUE 1
#define POWER 27 //27
#define TXD2 17
#define RXD2 16
#define LED_R 13
#define LED_G 15
#define LED_B 2
#define RECIVER 18
#define TOPIC "home/bigroom/"
//WiFiMulti wifiMulti;
//const uint32_t connectTimeoutMs = 5000;
byte periodMotion;
int8_t curDelay;
uint16_t spLight, dbLight;
uint8_t timeLight;
byte levelBlue, levelWhite;
bool move, lightWhite;
float temp, hum;
bool bLamp, wLamp, reciever;
uint8_t statLamp;
AsyncWebServer server(80);
#endif // __MAIN__