Skip to content

Commit

Permalink
feat: ArduinoIoTCloudNotecard
Browse files Browse the repository at this point in the history
  • Loading branch information
zfields committed Aug 10, 2024
1 parent 6ef7ad8 commit ee24a1b
Show file tree
Hide file tree
Showing 33 changed files with 1,045 additions and 81 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/compile-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ jobs:
- name: arduino:mbed_opta
libraries: |
- name: ArduinoECCX08
- name: Blues Wireless Notecard
sketch-paths: |
- examples/ArduinoIoTCloud-DeferredOTA
- examples/ArduinoIoTCloud-Notecard
- examples/utility/Provisioning
# GIGA
- board:
Expand Down
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,28 @@
### What?
The `ArduinoIoTCloud` library is the central element of the firmware enabling certain Arduino boards to connect to the [Arduino IoT Cloud](https://www.arduino.cc/en/IoT/HomePage). The following boards are supported:

* **WiFi**: [`MKR 1000`](https://store.arduino.cc/arduino-mkr1000-wifi), [`MKR WiFi 1010`](https://store.arduino.cc/arduino-mkr-wifi-1010), [`Nano 33 IoT`](https://store.arduino.cc/arduino-nano-33-iot), [`Portenta H7`](https://store.arduino.cc/portenta-h7), [`Nano RP2040 Connect`](https://store.arduino.cc/products/arduino-nano-rp2040-connect), [`Nicla Vision`](https://store.arduino.cc/products/nicla-vision), [`OPTA WiFi`](https://store.arduino.cc/products/opta-wifi), [`GIGA R1 WiFi`](https://store.arduino.cc/products/giga-r1-wifi), [`Portenta C33`](https://store.arduino.cc/products/portenta-c33), [`UNO R4 WiFi`](https://store.arduino.cc/products/uno-r4-wifi), [`Nano ESP32`](https://store.arduino.cc/products/nano-esp32), [`ESP8266`](https://github.com/esp8266/Arduino/releases/tag/2.5.0), [`ESP32`](https://github.com/espressif/arduino-esp32/releases/tag/2.0.5)
* **GSM**: [`MKR GSM 1400`](https://store.arduino.cc/arduino-mkr-gsm-1400-1415)
* **Wi-Fi**: [`MKR 1000`](https://store.arduino.cc/arduino-mkr1000-wifi), [`MKR WiFi 1010`](https://store.arduino.cc/arduino-mkr-wifi-1010), [`Nano 33 IoT`](https://store.arduino.cc/arduino-nano-33-iot), [`Portenta H7`](https://store.arduino.cc/portenta-h7), [`Nano RP2040 Connect`](https://store.arduino.cc/products/arduino-nano-rp2040-connect), [`Nicla Vision`](https://store.arduino.cc/products/nicla-vision), [`OPTA WiFi`](https://store.arduino.cc/products/opta-wifi), [`GIGA R1 WiFi`](https://store.arduino.cc/products/giga-r1-wifi), [`Portenta C33`](https://store.arduino.cc/products/portenta-c33), [`UNO R4 WiFi`](https://store.arduino.cc/products/uno-r4-wifi), [`Nano ESP32`](https://store.arduino.cc/products/nano-esp32), [`ESP8266`](https://github.com/esp8266/Arduino/releases/tag/2.5.0), [`ESP32`](https://github.com/espressif/arduino-esp32/releases/tag/2.0.5), [`Notecard`](https://shop.blues.com/collections/notecard)
* **GSM**: [`MKR GSM 1400`](https://store.arduino.cc/arduino-mkr-gsm-1400-1415), [`Notecard`](https://shop.blues.com/collections/notecard)
* **LTE**: [`Notecard`](https://shop.blues.com/collections/notecard)
* **5G**: [`MKR NB 1500`](https://store.arduino.cc/arduino-mkr-nb-1500-1413)
* **LoRa**: [`MKR WAN 1300/1310`](https://store.arduino.cc/mkr-wan-1310)
* **LoRa**: [`MKR WAN 1300/1310`](https://store.arduino.cc/mkr-wan-1310), [`Notecard`](https://shop.blues.com/collections/notecard)
* **Ethernet**: [`Portenta H7`](https://store.arduino.cc/products/portenta-h7) + [`Vision Shield Ethernet`](https://store.arduino.cc/products/arduino-portenta-vision-shield-ethernet), [`Max Carrier`](https://store.arduino.cc/products/portenta-max-carrier), [`Breakout`](https://store.arduino.cc/products/arduino-portenta-breakout), [`Portenta Machine Control`](https://store.arduino.cc/products/arduino-portenta-machine-control), [`OPTA WiFi`](https://store.arduino.cc/products/opta-wifi), [`OPTA RS485`](https://store.arduino.cc/products/opta-rs485), [`OPTA Lite`](https://store.arduino.cc/products/opta-lite), [`Portenta C33`](https://store.arduino.cc/products/portenta-c33) + [`Vision Shield Ethernet`](https://store.arduino.cc/products/arduino-portenta-vision-shield-ethernet)
* **Satellite**: [`Notecard`](https://shop.blues.com/collections/notecard)

#### More About Notecard Connectivity

The Notecard is a wireless, secure abstraction for device connectivity, that can
be used to enable _ANY*_ device with I2C, or UART, to connect to the Arduino IoT
Cloud via cellular, LoRa, satellite or Wi-Fi (including the devices listed
above)!

As a result, the STM32 architecture has now been added to this library. If you
have an STM32 device, you are now able to connect it to the Arduino IoT Cloud by
using a Notecard to provide a secure communication channel.

> \*_Unfortunately, the AVR architecture is not supported by the Arduino IoT
> Cloud library. Therefore, those devices are ineligible for use with the
> Notecard._
### How?
1) Register your Arduino IoT Cloud capable board via [Arduino IoT Cloud](https://create.arduino.cc/iot) (Devices Section).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This sketch demonstrates how to use more complex cloud data types such as a colour or coordinates.
IMPORTANT:
This sketch works with WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
This sketch works with Notecard, WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
On a LoRa board, if it is configured as a class A device (default and preferred option),
values from Cloud dashboard are received only after a value is sent to Cloud.
Expand All @@ -17,13 +17,15 @@ void setup() {
Serial.begin(9600);
for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime <= 5000); ) { }

/* Specify the level of detail for debug messages */
setDebugMessageLevel(DBG_INFO);

/* This function takes care of connecting your sketch variables to the ArduinoIoTCloud object */
initProperties();

/* Initialize Arduino IoT Cloud library */
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

setDebugMessageLevel(DBG_INFO);
ArduinoCloud.printDebugInfo();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ArduinoIoTCloud-Advanced/arduino_secrets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* A complete list of supported boards with WiFi is available here:
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
*/
#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
#endif
Expand Down
23 changes: 20 additions & 3 deletions examples/ArduinoIoTCloud-Advanced/thingProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Arduino_ConnectionHandler.h>
#include "arduino_secrets.h"

#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
#if !(defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
#endif
Expand All @@ -11,6 +11,18 @@
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(BOARD_HAS_LORA)
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(USE_NOTECARD)
/* The Notecard can provide connectivity to almost any board via ESLOV (I2C)
* or UART. An empty string (or the default value provided below) will not
* override the Notecard's existing configuration.
* Learn more at: https://dev.blues.io */
#define NOTECARD_PRODUCT_UID "com.domain.you:product"
#endif

void onSwitchButtonChange();
void onColorChange();

Expand All @@ -23,7 +35,10 @@ void initProperties() {
ArduinoCloud.setBoardId(BOARD_ID);
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
#endif
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
#if defined(BOARD_HAS_LORA)
ArduinoCloud.setThingId(THING_ID);
#endif
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
ArduinoCloud.addProperty(switchButton, Permission::Write).onUpdate(onSwitchButtonChange);
ArduinoCloud.addProperty(location, Permission::Read).publishOnChange(0.0f);
ArduinoCloud.addProperty(color, Permission::ReadWrite).onUpdate(onColorChange);
Expand All @@ -34,7 +49,9 @@ void initProperties() {
#endif
}

#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD)
NotecardConnectionHandler ArduinoIoTPreferredConnection(NOTECARD_PRODUCT_UID);
#elif defined(BOARD_HAS_WIFI)
WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_SSID, SECRET_WIFI_PASS);
#elif defined(BOARD_HAS_GSM)
GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
Expand Down
6 changes: 4 additions & 2 deletions examples/ArduinoIoTCloud-Basic/ArduinoIoTCloud-Basic.ino
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* When you flip the switch in the Cloud dashboard the onboard LED lights gets turned ON or OFF.
IMPORTANT:
This sketch works with WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
This sketch works with Notecard, WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
On a LoRa board, if it is configured as a class A device (default and preferred option),
values from Cloud dashboard are received only after a value is sent to Cloud.
Expand All @@ -25,6 +25,9 @@ void setup() {
Serial.begin(9600);
for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime <= 5000); ) { }

/* Specify the level of detail for debug messages */
setDebugMessageLevel(DBG_INFO);

/* Configure LED pin as an output */
pinMode(LED_BUILTIN, OUTPUT);

Expand All @@ -34,7 +37,6 @@ void setup() {
/* Initialize Arduino IoT Cloud library */
ArduinoCloud.begin(ArduinoIoTPreferredConnection);

setDebugMessageLevel(DBG_INFO);
ArduinoCloud.printDebugInfo();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ArduinoIoTCloud-Basic/arduino_secrets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* A complete list of supported boards with WiFi is available here:
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
*/
#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
#endif
Expand Down
23 changes: 20 additions & 3 deletions examples/ArduinoIoTCloud-Basic/thingProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Arduino_ConnectionHandler.h>
#include "arduino_secrets.h"

#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
#if !(defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
#endif
Expand All @@ -11,6 +11,18 @@
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(BOARD_HAS_LORA)
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(USE_NOTECARD)
/* The Notecard can provide connectivity to almost any board via ESLOV (I2C)
* or UART. An empty string (or the default value provided below) will not
* override the Notecard's existing configuration.
* Learn more at: https://dev.blues.io */
#define NOTECARD_PRODUCT_UID "com.domain.you:product"
#endif

void onLedChange();

bool led;
Expand All @@ -22,18 +34,23 @@ void initProperties() {
ArduinoCloud.setBoardId(BOARD_ID);
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
#endif
#if defined(BOARD_HAS_LORA)
ArduinoCloud.setThingId(THING_ID);
#endif
#if defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT)
ArduinoCloud.addProperty(led, Permission::Write).onUpdate(onLedChange);
ArduinoCloud.addProperty(potentiometer, Permission::Read).publishOnChange(10);
ArduinoCloud.addProperty(seconds, Permission::Read).publishOnChange(1);
#elif defined(BOARD_HAS_LORA)
#elif defined(USE_NOTECARD) || defined(BOARD_HAS_LORA)
ArduinoCloud.addProperty(led, 1, Permission::ReadWrite).onUpdate(onLedChange);
ArduinoCloud.addProperty(potentiometer, 2, Permission::Read).publishOnChange(10);
ArduinoCloud.addProperty(seconds, 3, Permission::Read).publishEvery(5 * MINUTES);
#endif
}

#if defined(BOARD_HAS_ETHERNET)
#if defined(USE_NOTECARD)
NotecardConnectionHandler ArduinoIoTPreferredConnection(NOTECARD_PRODUCT_UID);
#elif defined(BOARD_HAS_ETHERNET)
/* DHCP mode */
//EthernetConnectionHandler ArduinoIoTPreferredConnection;
/* Manual mode. It will fallback in DHCP mode if SECRET_OPTIONAL_IP is invalid or equal to "0.0.0.0" */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
One function per event can be assigned.
IMPORTANT:
This sketch works with WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
This sketch works with Notecard, WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
On a LoRa board, if it is configured as a class A device (default and preferred option),
values from Cloud dashboard are received only after a value is sent to Cloud.
Expand All @@ -33,6 +33,9 @@ void setup() {
Serial.begin(9600);
for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime <= 5000); ) { }

/* Specify the level of detail for debug messages */
setDebugMessageLevel(DBG_INFO);

/* This function takes care of connecting your sketch variables to the ArduinoIoTCloud object */
initProperties();

Expand All @@ -51,7 +54,6 @@ void setup() {
ArduinoCloud.addCallback(ArduinoIoTCloudEvent::SYNC, doThisOnSync);
ArduinoCloud.addCallback(ArduinoIoTCloudEvent::DISCONNECT, doThisOnDisconnect);

setDebugMessageLevel(DBG_INFO);
ArduinoCloud.printDebugInfo();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ArduinoIoTCloud-Callbacks/arduino_secrets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* A complete list of supported boards with WiFi is available here:
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
*/
#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
#endif
Expand Down
21 changes: 19 additions & 2 deletions examples/ArduinoIoTCloud-Callbacks/thingProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <Arduino_ConnectionHandler.h>
#include "arduino_secrets.h"

#if !(defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
#if !(defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI) || defined(BOARD_HAS_GSM) || defined(BOARD_HAS_LORA) || \
defined(BOARD_HAS_NB) || defined(BOARD_HAS_ETHERNET) || defined(BOARD_HAS_CATM1_NBIOT))
#error "Please check Arduino IoT Cloud supported boards list: https://github.com/arduino-libraries/ArduinoIoTCloud/#what"
#endif
Expand All @@ -11,14 +11,31 @@
#define BOARD_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(BOARD_HAS_LORA)
#define THING_ID "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
#endif

#if defined(USE_NOTECARD)
/* The Notecard can provide connectivity to almost any board via ESLOV (I2C)
* or UART. An empty string (or the default value provided below) will not
* override the Notecard's existing configuration.
* Learn more at: https://dev.blues.io */
#define NOTECARD_PRODUCT_UID "com.domain.you:product"
#endif

void initProperties() {
#if defined(BOARD_HAS_SECRET_KEY)
ArduinoCloud.setBoardId(BOARD_ID);
ArduinoCloud.setSecretDeviceKey(SECRET_DEVICE_KEY);
#endif
#if defined(BOARD_HAS_LORA)
ArduinoCloud.setThingId(THING_ID);
#endif
}

#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD)
NotecardConnectionHandler ArduinoIoTPreferredConnection(NOTECARD_PRODUCT_UID);
#elif defined(BOARD_HAS_WIFI)
WiFiConnectionHandler ArduinoIoTPreferredConnection(SECRET_WIFI_SSID, SECRET_WIFI_PASS);
#elif defined(BOARD_HAS_GSM)
GSMConnectionHandler ArduinoIoTPreferredConnection(SECRET_PIN, SECRET_APN, SECRET_LOGIN, SECRET_PASS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ void setup() {
Serial.begin(9600);
for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime <= 5000); ) { }

/* Specify the level of detail for debug messages */
setDebugMessageLevel(DBG_INFO);

/* Configure LED pin as an output */
pinMode(LED_BUILTIN, OUTPUT);

Expand All @@ -70,7 +73,6 @@ void setup() {
/* Setup OTA callback */
ArduinoCloud.onOTARequestCb(onOTARequestCallback);

setDebugMessageLevel(DBG_INFO);
ArduinoCloud.printDebugInfo();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/ArduinoIoTCloud-DeferredOTA/arduino_secrets.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* A complete list of supported boards with WiFi is available here:
* https://github.com/arduino-libraries/ArduinoIoTCloud/#what
*/
#if defined(BOARD_HAS_WIFI)
#if defined(USE_NOTECARD) || defined(BOARD_HAS_WIFI)
#define SECRET_WIFI_SSID "YOUR_WIFI_NETWORK_NAME"
#define SECRET_WIFI_PASS "YOUR_WIFI_PASSWORD"
#endif
Expand Down
68 changes: 68 additions & 0 deletions examples/ArduinoIoTCloud-Notecard/ArduinoIoTCloud-Notecard.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/*
This sketch demonstrates how to exchange data between your board and the Arduino IoT Cloud.
* Connect a potentiometer (or other analog sensor) to A0.
* When the potentiometer (or sensor) value changes the data is sent to the Cloud.
* When you flip the switch in the Cloud dashboard the onboard LED lights gets turned ON or OFF.
IMPORTANT:
This sketch works with Notecard, WiFi, GSM, NB, Ethernet and Lora enabled boards supported by Arduino IoT Cloud.
On a LoRa board, if it is configured as a class A device (default and preferred option),
values from Cloud dashboard are received only after a value is sent to Cloud.
The full list of compatible boards can be found here:
- https://github.com/arduino-libraries/ArduinoIoTCloud#what
*/

#include <Notecard.h>
#include "thingProperties.h"

#if !defined(LED_BUILTIN) && !defined(ARDUINO_NANO_ESP32)
static int const LED_BUILTIN = 2;
#endif

/*
* Choose an interrupt capable pin to reduce polling and improve
* the overall responsiveness of the ArduinoIoTCloud library
*/
// #define ATTN_PIN 9

void setup() {
/* Initialize serial and wait up to 5 seconds for port to open */
Serial.begin(9600);
for(unsigned long const serialBeginTime = millis(); !Serial && (millis() - serialBeginTime <= 5000); ) { }

/* Specify the level of detail for debug messages */
setDebugMessageLevel(DBG_INFO);

/* Configure LED pin as an output */
pinMode(LED_BUILTIN, OUTPUT);

/* This function takes care of connecting your sketch variables to the ArduinoIoTCloud object */
initProperties();

/* Initialize Arduino IoT Cloud library */
#ifndef ATTN_PIN
ArduinoCloud.begin(ArduinoIoTPreferredConnection);
ArduinoCloud.setNotecardPollingInterval(3000); // default: 1000ms, min: 250ms
#else
ArduinoCloud.begin(ArduinoIoTPreferredConnection, ATTN_PIN);
#endif

ArduinoCloud.printDebugInfo();
}

void loop() {
ArduinoCloud.update();
potentiometer = analogRead(A0);
seconds = millis() / 1000;
}

/*
* 'onLedChange' is called when the "led" property of your Thing changes
*/
void onLedChange() {
Serial.print("LED set to ");
Serial.println(led);
digitalWrite(LED_BUILTIN, led);
}
Loading

0 comments on commit ee24a1b

Please sign in to comment.