pslockout/firmware/firmware.h

44 lines
965 B
C
Raw Normal View History

2019-02-18 05:45:02 +00:00
#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