|
|
|
|
|
|
|
|
#include "user_interface.h" |
|
|
#include "user_interface.h" |
|
|
} |
|
|
} |
|
|
// OTA & WEB |
|
|
// OTA & WEB |
|
|
#include <ESP8266WiFi.h> |
|
|
|
|
|
#include <WiFiUdp.h> |
|
|
|
|
|
#include <ArduinoOTA.h> |
|
|
|
|
|
#include "ota.h" |
|
|
#include "ota.h" |
|
|
|
|
|
|
|
|
#include "wifi_credentials.h" |
|
|
#include "wifi_credentials.h" |
|
|
#include "httpserver.h" |
|
|
#include "httpserver.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define NODEMCU_LED 16 |
|
|
#define NODEMCU_LED 16 |
|
|
|
|
|
|
|
|
// PWM |
|
|
// PWM |
|
|
|
|
|
|
|
|
#include "pwm.h" |
|
|
#include "pwm.h" |
|
|
os_timer_t timer1; |
|
|
os_timer_t timer1; |
|
|
uint8_t timer_flag = 0; |
|
|
uint8_t timer_flag = 0; |
|
|
|
|
|
|
|
|
Treppe stairs(13); |
|
|
Treppe stairs(13); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// WIFI |
|
|
// WIFI |
|
|
const char* ssid = STASSID; |
|
|
const char* ssid = STASSID; |
|
|
const char* password = STAPSK; |
|
|
const char* password = STAPSK; |
|
|
|
|
|
|
|
|
pinMode(ESP12_LED, OUTPUT); |
|
|
pinMode(ESP12_LED, OUTPUT); |
|
|
|
|
|
|
|
|
Wire.begin(); // Wire must be started first |
|
|
Wire.begin(); // Wire must be started first |
|
|
|
|
|
|
|
|
|
|
|
Wire.setClock(1000000); // Supported baud rates are 100kHz, 400kHz, and 1000kHz |
|
|
|
|
|
|
|
|
WiFi.mode(WIFI_STA); |
|
|
WiFi.mode(WIFI_STA); |
|
|
WiFi.begin(ssid, password); |
|
|
WiFi.begin(ssid, password); |
|
|
|
|
|
|