ahoy/tools/esp8266/esp8266.ino
lumapu 8f444cee2f * improved tickers, only one ticker is active
* added feature to use the ESP as access point for all the time
* added serial features to setup
2022-05-04 19:28:54 +02:00

33 lines
724 B
C++

#include "Arduino.h"
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <Ticker.h>
#include <ESP8266HTTPUpdateServer.h>
#include "app.h"
#include "config.h"
app myApp;
//-----------------------------------------------------------------------------
void setup() {
myApp.setup(WIFI_TRY_CONNECT_TIME);
// TODO: move to HmRadio
attachInterrupt(digitalPinToInterrupt(myApp.getIrqPin()), handleIntr, FALLING);
}
//-----------------------------------------------------------------------------
void loop() {
myApp.loop();
}
//-----------------------------------------------------------------------------
ICACHE_RAM_ATTR void handleIntr(void) {
myApp.handleIntr();
}