51 lines
947 B
C
51 lines
947 B
C
#ifndef __MAIN__
|
|
#define __MAIN__
|
|
|
|
#include <Arduino.h>
|
|
#include <ArduinoOTA.h>
|
|
#include <Ticker.h>
|
|
#include <WiFi.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>
|
|
|
|
#define BAUDRATE 9600
|
|
|
|
#define LIGHT_SENS 36 //VP
|
|
#define MOVE_SENS 39 //VN
|
|
|
|
|
|
#define LED_WHITE 25 //25
|
|
#define PWM_WHITE 0
|
|
#define LED_BLUE 26 //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 TOPIC "home/bigroom/"
|
|
|
|
byte periodMotion;
|
|
int8_t curDelay;
|
|
uint16_t spLight, dbLight;
|
|
uint8_t timeLight;
|
|
byte levelBlue, levelWhite;
|
|
bool move, lightWhite;
|
|
float temp, hum;
|
|
bool bLamp, wLamp;
|
|
uint8_t statLamp;
|
|
|
|
#endif // __MAIN__
|