-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy paththingProperties.h
32 lines (23 loc) · 1.1 KB
/
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
27
28
29
30
31
32
// Code generated by Arduino IoT Cloud, DO NOT EDIT.
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>
const char DEVICE_LOGIN_NAME[] = "262b551e-2421-4f99-871c-cd35b8344722";
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 onWATERPUMPChange();
CloudTemperatureSensor tEMPERATURE;
int lIGHT;
int sOIL_MOISTURE;
CloudRelativeHumidity hUMIDITY;
bool wATER_PUMP;
void initProperties(){
ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME);
ArduinoCloud.setSecretDeviceKey(DEVICE_KEY);
ArduinoCloud.addProperty(tEMPERATURE, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(lIGHT, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(sOIL_MOISTURE, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(hUMIDITY, READ, ON_CHANGE, NULL);
ArduinoCloud.addProperty(wATER_PUMP, READWRITE, ON_CHANGE, onWATERPUMPChange);
}
WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);