-
Notifications
You must be signed in to change notification settings - Fork 0
/
WiFi_Clock2.ino
42 lines (35 loc) · 951 Bytes
/
WiFi_Clock2.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
#include <Arduino.h>
#include "networkTime.h"
#include "zIOTBP32/zsetupBP.h"// Required
#include "State.h"
#include "weather.h"
#include "setupMatrix.h"
#include "matrixBorders.h"
#include "modes.h"
#include "routes.h"
State st;
void setup() {
Serial.begin(115200);
setupBP("WiFiClock", "HERSHEL", "meowmeow");// Required
st.lenX = matrix.lenX()-1;
st.lenY = matrix.lenY()-1;
// Setup DHT
dht.begin();
// Setup Routes
server.on("/localTime", HTTP_GET, r_localTime);
server.on("/border", HTTP_GET, r_border);
server.on("/mode", HTTP_GET, r_mode);
server.on("/intensity", HTTP_GET, r_intensity);
server.on("/say", HTTP_GET, r_say);
server.on("/state", HTTP_GET, r_state);
server.on("/syncTime", HTTP_GET, r_syncTime);
server.on("/app", HTTP_GET, r_app);
setupTime();
getWeather();
}
void loop() {
loopBP();
runMode(matrix, st);
runBorder(matrix, st);
matrix.delayF();
}