You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
965 B

#ifndef FIRMWARE_H
#define FIRMWARE_H
#include <Arduino.h>
#include <ArduinoJson.h>
#include <base64.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
#include <ESP8266httpUpdate.h>
#include <EEPROM.h>
#include <Ticker.h>
#include <time.h>
#if !defined(ARDUINO_ESP8266_RELEASE_2_5_0) || ARDUINOJSON_VERSION_MAJOR != 5 || ARDUINOJSON_VERSION_MINOR != 13 || ARDUINOJSON_VERSION_REVISION != 3
#error Incorrect library version detected. See README.
#endif
#include "utils.h"
#include "logging.h"
#include "lock.h"
#include "leds.h"
#include "wifi.h"
#include "comm.h"
#define DELAY_TIME 10
#define RELAY_PIN D1
#define GREEN_BUTTON_PIN D3
#define RED_BUTTON_PIN D4
#define GREEN_LED_PIN D6
#define RED_LED_PIN D7
#define RELAY_CLOSED HIGH
#define RELAY_OPEN !RELAY_CLOSED
#define BUTTON_CLOSED LOW
#define BUTTON_OPEN !BUTTON_CLOSED
#define LED_PIN_ON HIGH
#define LED_PIN_OFF !LED_PIN_ON
#define EEPROM_SIZE 4095
#define EEPROM_END_MARKER '\0'
#endif