-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathESP8266IoTAdapter.h
39 lines (29 loc) · 903 Bytes
/
ESP8266IoTAdapter.h
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
#ifndef __ESP8266IOTADAPTER_H__
#define __ESP8266IOTADAPTER_H__
#include "Arduino.h"
#include <SoftwareSerial.h>
class ESP8266IoTAdapter
{
public:
ESP8266IoTAdapter(SoftwareSerial &serial, int baudrate = 9600);
String executeWithResponse(String command);
bool execute(String command);
bool connectToAP(String ssid, String password);
bool connectToAP(String ssid);
bool configAP(String ssid, String password);
bool configAP(String ssid);
String getIP();
int getWifiStatus();
bool gotIP();
bool startServer();
bool stopServer();
bool restartServer();
bool setValue(String key, bool value);
bool setValue(String key, int value);
bool setValue(String key, long value);
bool setValue(String key, double value);
bool setValue(String key, String value);
private:
SoftwareSerial *_serial;
};
#endif //__ESP8266IOTADAPTER_H__