IoTtweetESP32.h
1.15 KB
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
/*
library for IoTtweet.com, using via api.iottweet.com
Compatible use with ESP32 WiFi and BLE chip from espressif.
Created by : IoTtweet tech. team
Date : 2016.Oct.15
*/
#ifndef IoTtweetESP32_h
#define IoTtweetESP32_h
#include "Arduino.h"
#include "WiFi.h"
#include "ArduinoJson.h"
class IoTtweetESP32
{
public:
bool begin(const char *ssid, const char *passw);
String WriteDashboard(const char *userid, const char *key, float slot0, float slot1, float slot2, float slot3, String tw, String twpb);
String ReadControlPanel(const char *userid, const char *key);
String ReadDigitalSwitch(const char *userid, const char *key, uint8_t sw);
String getVersion();
float ReadAnalogSlider(const char *userid, const char *key, uint8_t slider);
private:
const char *_ssid, *_passw;
const char *_userid, *_key;
String _tw, _twpb;
float _slot0, _slot1, _slot2, _slot3;
const char *_libversion;
String _str, _response, _controlpanelstatus;
const char *_sw1status, *_sw2status, *_sw3status, *_sw4status, *_sw5status, *_sl1status, *_sl2status, *_sl3status;
float f_sl1status, f_sl2status, f_sl3status;
String _allcontrol;
uint8_t _sw, _slider;
};
#endif