-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from DatavenueLiveObjects/update
Update package
- Loading branch information
Showing
56 changed files
with
954 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
name=LiveObjectsSDK | ||
version=2.1.1 | ||
version=2.1.2 | ||
author=Orange | ||
maintainer=Marc Delain <[email protected]>, Krzysztof Krzeslak <[email protected]>, Tomasz Malek <[email protected]> | ||
sentence=A library that makes connection with Orange LiveObjects platform a breeze. | ||
paragraph=Supports connection with LiveObjects platform in device mode, with the use of LTE, GSM or WifI connectivity. | ||
sentence=A library that simplifies the integration of Arduino boards with Live Objects, the IoT platform from Orange. | ||
paragraph=Upgrade your Arduino projects to IoT with this library, which allows you to easily connect your board to the Live Objects platform: send data, remotely modify execution parameters, or send commands to interact with your board. | ||
category=Communication | ||
url=https://github.com/DatavenueLiveObjects/LiveObjects_SDK_for_Arduino | ||
architectures=* | ||
includes=LiveObjects.h | ||
depends=WiFiNINA,MKRNB,ArduinoJson,MKRGSM,WiFi101,PubSubClient,ArduinoMqttClient,SparkFun VL6180 Sensor | ||
depends=WiFiNINA,MKRNB,ArduinoJson(=6.21.5),MKRGSM,WiFi101,PubSubClient,ArduinoMqttClient,SparkFun VL6180 Sensor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/****************************************************************************** | ||
INCLUDES | ||
******************************************************************************/ | ||
#include "arduino_secrets.h" | ||
#include <LiveObjects.h> | ||
/****************************************************************************** | ||
USER VARIABLES | ||
******************************************************************************/ | ||
uint32_t messageRate = 15000; // stores the current data message rate in Milliseconds | ||
unsigned long uptime; // stores the device uptime (sent as fake sensor data) | ||
unsigned long lastMessageTime = 0; // stores the time when last data message was sent | ||
|
||
/****************************************************************************** | ||
USER PROGRAM | ||
******************************************************************************/ | ||
void setup() { | ||
delay(2000); | ||
Serial.begin(9600); | ||
Serial.print("\n*** Live Objects SDK for Arduino, revision "); | ||
Serial.print(SW_REVISION); | ||
Serial.println(" ***\n"); | ||
lo.setSecurity(TLS); | ||
lo.begin(MQTT, TEXT, true); | ||
lo.connect(); // connects to the network + Live Objects | ||
} | ||
|
||
void loop() { | ||
if (millis() - lastMessageTime > messageRate) { | ||
// collect data periodically | ||
Serial.println("Sampling data"); | ||
uptime = millis(); | ||
lo.addToPayload("uptime", uptime); // adding 'uptime' value to the current payload | ||
Serial.println("Sending data to Live Objects"); | ||
lo.sendData(); // send the data to Live Objects | ||
lastMessageTime = millis(); | ||
} | ||
lo.loop(); // don't forget to keep this in your main loop | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Send data to Live Objects | ||
|
||
This example shows how to send some sample data (device uptime) to Live Objects using Arduino MKR NB 1500. | ||
![diagram](img/send_data_diagram.png) | ||
|
||
## Running | ||
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then: | ||
1. Open "1_send_data.ino" sketch using Arduino IDE | ||
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="";``` in arduino_secrets.h with API key you generated | ||
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md** | ||
4. Upload *1_send_data.ino* sketch to your Arduino MKR NB 1500 board | ||
|
||
|
||
## Verify | ||
**Is device online:**<br> | ||
If all went fine under **devices** tab on Live Live Objects portal you should see online your device identified by its modem IMEI: | ||
|
||
![device_online](img/device_online.png) | ||
|
||
**Is device sending data:**<br> | ||
Under data tab on Live Objects portal you should see messages sent by your device, along with values *{ "uptime": xxxxx }* | ||
|
||
![data_portal](img/data_portal.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Cellular connection cerdentials, used only for GSM boards | ||
extern const String SECRET_PINNUMBER = ""; // unless PIN is deactivated, specify your SIM card PIN number | ||
extern const String SECRET_APN = ""; // specify the APN name (if needed) | ||
extern const String SECRET_APN_USER = ""; // specify the username for your APN (if needed) | ||
extern const String SECRET_APN_PASS = ""; // specify the password for your APN (if needed) | ||
extern const String SECRET_SERVER_MSISDN = ""; // specify the number of server(gate) | ||
|
||
// WIFI connection credentials, used only for WiFi boards | ||
extern const String SECRET_SSID = ""; // unless PIN is deactivated, specify your SIM card PIN number | ||
extern const String SECRET_WIFI_PASS = ""; // specify the APN name (if needed) | ||
|
||
// Live Objects credential: paste below your API key (see Configuration > API keys on the portal). | ||
// You API key must have at least the predefined 'MQTT Device' rights profile | ||
// (alternatively: 'Device Access' read + write rights if need to customise the rights). | ||
// Please note that you *must* use a TLS connection (MQTTS) if you grant more rights to the API key. | ||
extern const String SECRET_LIVEOBJECTS_API_KEY = ""; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.