mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-01 11:16:20 +02:00
* added option to compile WiFi SSID + PWD to firmware * added option to configure WiFi access point name and password * added feature to retry connect to station WiFi (configurable timeouts) * updated index.html * added option for factory reset * added info about project on index.html * moved "update" and "home" to footer * fixed #23 HM1200 yield day unit * fixed DNS name of ESP after setup (some commits before)
33 lines
751 B
C++
33 lines
751 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_AP_SSID, WIFI_AP_PWD, 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();
|
|
}
|