-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy paththingProperties.h
More file actions
27 lines (19 loc) · 831 Bytes
/
thingProperties.h
File metadata and controls
27 lines (19 loc) · 831 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
// Code generated by Arduino IoT Cloud.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
const char SSID[] = ""; // Network SSID (name)
const char PASS[] = ""; // Network password (use for WPA, or use as key for WEP)
/* all variables uploaded to Cloud should be write here */
void onUserLogin1Change();
void onUserLogin2Change();
String user1_log;
String user2_log;
String user_login_1;
String user_login_2;
void initProperties(){
ArduinoCloud.addProperty(user1_log, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(user2_log, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(user_login_1, READWRITE, 5*SECONDS, onUserLogin1Change);
ArduinoCloud.addProperty(user_login_2, READWRITE, 5*SECONDS, onUserLogin2Change);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);