From 6c6d2b023f7ecf7dcb42655704d029d6081a23b8 Mon Sep 17 00:00:00 2001 From: K Gray <64373011+Kgray44@users.noreply.github.com> Date: Wed, 7 Jun 2023 09:24:00 -0400 Subject: [PATCH] Create thingProperties.h --- diy_e-scooter/thingProperties.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 diy_e-scooter/thingProperties.h diff --git a/diy_e-scooter/thingProperties.h b/diy_e-scooter/thingProperties.h new file mode 100644 index 0000000..36efb8e --- /dev/null +++ b/diy_e-scooter/thingProperties.h @@ -0,0 +1,28 @@ +#include +#include + +const char DEVICE_LOGIN_NAME[] = "********-*****-****-******-*******"; + +const char SSID[] = "***SSID***"; // Network SSID (name) +const char PASS[] = "***PASS***"; // Network password (use for WPA, or use as key for WEP) +const char DEVICE_KEY[] = "***DEVICE_KEY****"; // Secret device password + +void onIftttCounterChange(); +void onMaxspeedChange(); +void onLockChange(); + +CloudCounter ifttt_counter; +float maxspeed; +bool lock; + +void initProperties(){ + + ArduinoCloud.setBoardId(DEVICE_LOGIN_NAME); + ArduinoCloud.setSecretDeviceKey(DEVICE_KEY); + ArduinoCloud.addProperty(ifttt_counter, READWRITE, ON_CHANGE, onIftttCounterChange, 1); + ArduinoCloud.addProperty(maxspeed, READWRITE, ON_CHANGE, onMaxspeedChange); + ArduinoCloud.addProperty(lock, READWRITE, ON_CHANGE, onLockChange); + +} + +WiFiConnectionHandler ArduinoIoTPreferredConnection(SSID, PASS);