Skip to content

Commit

Permalink
Create thingProperties.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Kgray44 authored Jun 7, 2023
1 parent ae3501f commit 6c6d2b0
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions diy_e-scooter/thingProperties.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include <ArduinoIoTCloud.h>
#include <Arduino_ConnectionHandler.h>

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);

0 comments on commit 6c6d2b0

Please sign in to comment.