-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththingProperties.h
26 lines (18 loc) · 915 Bytes
/
thingProperties.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
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
#include "secrets.h"
const char DEVICE_LOGIN_NAME[] = "79196d36-d129-45da-9b69-ad27bfc1f5f6";
const char SSID[] = SECRET_SSID; // Network SSID (name)
const char PASS[] = SECRET_OPTIONAL_PASS; // Network password (use for WPA, or use as key for WEP)
const char DEVICE_KEY[] = SECRET_DEVICE_KEY; // Secret device password
void onWindowMotorChange();
void onWindowTempChange();
CloudDimmedLight window_motor;
CloudTemperatureSensor window_temp;
void initProperties(){
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(window_motor, READWRITE, ON_CHANGE, onWindowMotorChange);
ArduinoCloud.addProperty(window_temp, READWRITE, ON_CHANGE, onWindowTempChange);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);