-
-
Notifications
You must be signed in to change notification settings - Fork 372
/
esp_duck.ino
53 lines (40 loc) · 996 Bytes
/
esp_duck.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
This software is licensed under the MIT License. See the license file for details.
Source: https://github.com/spacehuhntech/WiFiDuck
*/
#include "config.h"
#include "debug.h"
#include "com.h"
#include "duckscript.h"
#include "webserver.h"
#include "spiffs.h"
#include "settings.h"
#include "cli.h"
void setup() {
debug_init();
delay(200);
com::begin();
spiffs::begin();
settings::begin();
cli::begin();
webserver::begin();
com::onDone(duckscript::nextLine);
com::onError(duckscript::stopAll);
com::onRepeat(duckscript::repeat);
if (spiffs::freeBytes() > 0) com::send(MSG_STARTED);
delay(10);
com::update();
debug("\n[~~~ WiFi Duck v");
debug(VERSION);
debugln(" Started! ~~~]");
debugln(" __");
debugln("___( o)>");
debugln("\\ <_. )");
debugln(" `---' hjw\n");
duckscript::run(settings::getAutorun());
}
void loop() {
com::update();
webserver::update();
debug_update();
}