mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-30 02:36:20 +02:00
* added feature to use the ESP as access point for all the time * added serial features to setup
33 lines
724 B
C++
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();
|
|
}
|