mirror of
https://github.com/lumapu/ahoy.git
synced 2025-04-30 10:46:24 +02:00
* html / css files are now located inside PROGMEM * conversion of files is done with python script (OS independent, open source) * moved as much as possible for now to the hm* modules - the app should only be the body * successfully tested with HM1200
33 lines
743 B
C++
33 lines
743 B
C++
|
|
#include "Arduino.h"
|
|
|
|
#include <ESP8266WiFi.h>
|
|
#include <DNSServer.h>
|
|
#include <ESP8266WebServer.h>
|
|
#include <Ticker.h>
|
|
|
|
#include <ESP8266HTTPUpdateServer.h>
|
|
#include "app.h"
|
|
|
|
app myApp;
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void setup() {
|
|
// AP name, password, timeout
|
|
myApp.setup("ESP AHOY", "esp_8266", 15);
|
|
|
|
// TODO: move to HmRadio
|
|
attachInterrupt(digitalPinToInterrupt(myApp.getIrqPin()), handleIntr, FALLING);
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
void loop() {
|
|
myApp.loop();
|
|
}
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
ICACHE_RAM_ATTR void handleIntr(void) {
|
|
myApp.handleIntr();
|
|
}
|