-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDynamicWifi.h
More file actions
36 lines (31 loc) · 819 Bytes
/
DynamicWifi.h
File metadata and controls
36 lines (31 loc) · 819 Bytes
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
#ifndef DynamicWifi_h
#define DynamicWifi_h
#include "Arduino.h"
#include <ESP8266WiFi.h>
// #define debug_dynamic_wifi
#ifdef debug_dynamic_wifi
#define debug_dw_print(...) Serial.print(__VA_ARGS__)
#define debug_dw_println(...) Serial.println(__VA_ARGS__)
#define debug_dw_write(...) Serial.write(__VA_ARGS__)
#define debug_dw_printf(...) Serial.printf(__VA_ARGS__)
#else
#define debug_dw_print(...)
#define debug_dw_println(...)
#define debug_dw_write(...)
#define debug_dw_printf(...)
#endif
class DynamicWifi {
public:
DynamicWifi(char*);
~DynamicWifi();
bool tryConfigure();
private:
void handleGet(WiFiClient);
void handlePost(WiFiClient, String);
void status(WiFiClient, short);
String ssid;
String password;
WiFiServer* server;
void decodeFields();
};
#endif