File tree 14 files changed +43
-37
lines changed
ArduinoIoTCloud-BlockForOTA
ArduinoIoTCloud-Callbacks
ArduinoIoTCloud-DeferredOTA
utility/ArduinoIoTCloud_Travis_CI
14 files changed +43
-37
lines changed Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
@@ -22,14 +22,15 @@ CloudLocation location;
22
22
CloudColor color ;
23
23
24
24
void initProperties () {
25
- #if defined(BOARD_HAS_SECRET_KEY )
26
- ArduinoCloud .setBoardId (BOARD_ID );
27
- ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
28
- #endif
29
25
#if defined(HAS_TCP )
30
26
ArduinoCloud .addProperty (switchButton , Permission ::Write ).onUpdate (onSwitchButtonChange );
31
27
ArduinoCloud .addProperty (location , Permission ::Read ).publishOnChange (0.0f );
32
28
ArduinoCloud .addProperty (color , Permission ::ReadWrite ).onUpdate (onColorChange );
29
+
30
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
31
+ ArduinoCloud .setBoardId (BOARD_ID );
32
+ ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
33
+ #endif
33
34
#elif defined(HAS_LORA )
34
35
ArduinoCloud .addProperty (switchButton , 1 , Permission ::Write ).onUpdate (onSwitchButtonChange );
35
36
ArduinoCloud .addProperty (location , 2 , Permission ::Read ).publishOnChange (0.0f );
Original file line number Diff line number Diff line change 4
4
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
5
5
*/
6
6
#if defined(BOARD_HAS_WIFI )
7
- #define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME "
8
- #define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD "
7
+ #define SECRET_WIFI_SSID "-_- "
8
+ #define SECRET_WIFI_PASS "smea86861518 "
9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
@@ -21,14 +21,15 @@ int potentiometer;
21
21
int seconds ;
22
22
23
23
void initProperties () {
24
- #if defined(BOARD_HAS_SECRET_KEY )
25
- ArduinoCloud .setBoardId (BOARD_ID );
26
- ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
27
- #endif
28
24
#if defined(HAS_TCP )
29
25
ArduinoCloud .addProperty (led , Permission ::Write ).onUpdate (onLedChange );
30
26
ArduinoCloud .addProperty (potentiometer , Permission ::Read ).publishOnChange (10 );
31
27
ArduinoCloud .addProperty (seconds , Permission ::Read ).publishOnChange (1 );
28
+
29
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
30
+ ArduinoCloud .setBoardId (BOARD_ID );
31
+ ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
32
+ #endif
32
33
#elif defined(HAS_LORA )
33
34
ArduinoCloud .addProperty (led , 1 , Permission ::ReadWrite ).onUpdate (onLedChange );
34
35
ArduinoCloud .addProperty (potentiometer , 2 , Permission ::Read ).publishOnChange (10 );
Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
@@ -21,14 +21,15 @@ int potentiometer;
21
21
int seconds ;
22
22
23
23
void initProperties () {
24
- #if defined(BOARD_HAS_SECRET_KEY )
25
- ArduinoCloud .setBoardId (BOARD_ID );
26
- ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
27
- #endif
28
24
#if defined(HAS_TCP )
29
25
ArduinoCloud .addProperty (led , Permission ::Write ).onUpdate (onLedChange );
30
26
ArduinoCloud .addProperty (potentiometer , Permission ::Read ).publishOnChange (10 );
31
27
ArduinoCloud .addProperty (seconds , Permission ::Read ).publishOnChange (1 );
28
+
29
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
30
+ ArduinoCloud .setBoardId (BOARD_ID );
31
+ ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
32
+ #endif
32
33
#elif defined(HAS_LORA )
33
34
ArduinoCloud .addProperty (led , 1 , Permission ::ReadWrite ).onUpdate (onLedChange );
34
35
ArduinoCloud .addProperty (potentiometer , 2 , Permission ::Read ).publishOnChange (10 );
Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
15
15
#endif
16
16
17
17
void initProperties () {
18
- #if defined(BOARD_HAS_SECRET_KEY )
18
+ #if defined(HAS_TCP )
19
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
19
20
ArduinoCloud .setBoardId (BOARD_ID );
20
21
ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
21
22
#endif
22
- #if defined(BOARD_HAS_LORA )
23
+ #elif defined(HAS_LORA )
23
24
ArduinoCloud .setThingId (THING_ID );
24
25
#endif
25
26
}
Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
@@ -15,11 +15,12 @@ void onLedChange();
15
15
bool led ;
16
16
17
17
void initProperties () {
18
- #if defined(BOARD_HAS_SECRET_KEY )
18
+ #if defined(HAS_TCP )
19
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
19
20
ArduinoCloud .setBoardId (BOARD_ID );
20
21
ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
21
22
#endif
22
-
23
+ #endif
23
24
ArduinoCloud .addProperty (led , Permission ::Write ).onUpdate (onLedChange );
24
25
}
25
26
Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32 */
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 6
6
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
7
7
#endif
8
8
9
- #if defined(BOARD_HAS_SECRET_KEY )
9
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
10
10
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
11
11
#endif
12
12
@@ -26,10 +26,6 @@ CloudSchedule monthly;
26
26
CloudSchedule yearly ;
27
27
28
28
void initProperties () {
29
- #if defined(BOARD_HAS_SECRET_KEY )
30
- ArduinoCloud .setBoardId (BOARD_ID );
31
- ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
32
- #endif
33
29
#if defined(HAS_TCP )
34
30
ArduinoCloud .addProperty (switchButton , Permission ::Write );
35
31
ArduinoCloud .addProperty (oneShot , Permission ::ReadWrite );
@@ -39,6 +35,11 @@ void initProperties() {
39
35
ArduinoCloud .addProperty (weekly , Permission ::ReadWrite );
40
36
ArduinoCloud .addProperty (monthly , Permission ::ReadWrite );
41
37
ArduinoCloud .addProperty (yearly , Permission ::ReadWrite );
38
+
39
+ #if !defined(BOARD_HAS_SECURE_ELEMENT )
40
+ ArduinoCloud .setBoardId (BOARD_ID );
41
+ ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
42
+ #endif
42
43
#elif defined(HAS_LORA )
43
44
ArduinoCloud .addProperty (switchButton , 1 , Permission ::Write );
44
45
Original file line number Diff line number Diff line change 9
9
#endif
10
10
11
11
/* ESP8266 ESP32*/
12
- #if defined(BOARD_HAS_SECRET_KEY )
12
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
13
13
#define SECRET_DEVICE_KEY "my-device-password"
14
14
#endif
15
15
Original file line number Diff line number Diff line change 10
10
DEFINES
11
11
******************************************************************************/
12
12
13
- #if defined(BOARD_HAS_SECRET_KEY )
13
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
14
14
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
15
15
#endif
16
16
@@ -86,7 +86,7 @@ void onStringPropertyChange();
86
86
******************************************************************************/
87
87
#if defined(HAS_TCP )
88
88
void initProperties () {
89
- #if defined(BOARD_HAS_SECRET_KEY )
89
+ #if ! defined(BOARD_HAS_SECURE_ELEMENT )
90
90
ArduinoCloud .setBoardId (BOARD_ID );
91
91
ArduinoCloud .setSecretDeviceKey (SECRET_DEVICE_KEY );
92
92
#endif
You can’t perform that action at this time.
0 commit comments