Skip to content

Commit 9c6e969

Browse files
authored
Merge pull request #14 from tomekmalek/master
Change client id naming
2 parents 74cf865 + a154404 commit 9c6e969

File tree

14 files changed

+33
-30
lines changed

14 files changed

+33
-30
lines changed

examples/1_send_data/1_send_data.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void setup() {
1717
Serial.begin(115200);
1818
Serial.print("\n*** Live Objects for Arduino MKR boards, revision ");
1919
Serial.print(SW_REVISION);
20-
Serial.println("***");
20+
Serial.println(" ***");
2121
lo.setSecurity(TLS);
2222
lo.begin(MQTT, TEXT, true);
2323
lo.connect(); // connects to the network + Live Objects

examples/1_send_data/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This example shows how to send some sample data (device uptime) to Live Objects
77
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then:
88
1. Open "1_send_data.ino" sketch using Arduino IDE
99
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="...";``` in arduino_secrets.h with API key you generated
10-
3. Upload *1_send_data.ino* sketch to your Arduino MKR NB 1500 board
10+
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md**
11+
4. Upload *1_send_data.ino* sketch to your Arduino MKR NB 1500 board
1112

1213

1314
## Verify

examples/2_simple_parameters/2_simple_parameters.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void setup() {
2222
Serial.begin(115200);
2323
Serial.print("\n*** Live Objects on Arduino MKR NB boards, revision ");
2424
Serial.print(SW_REVISION);
25-
Serial.println("***");
25+
Serial.println(" ***");
2626

2727
// Declaring a simple parameter stored in the variable 'messageRate'.
2828
// This parameter will become available for modification over the air from Live Objects

examples/2_simple_parameters/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ Parameters give you ability to configure your device over the air from Live Obje
88
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then:
99
1. Open "2_simple_parameters.ino" sketch using Arduino IDE
1010
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="...";``` in arduino_secrets.h with API key you generated
11-
3. Upload *2_simple_parameters.ino* sketch to your Arduino MKR NB 1500 board
11+
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md**
12+
4. Upload *2_simple_parameters.ino* sketch to your Arduino MKR NB 1500 board
1213

1314

1415
## Verify

examples/3_Parameter_with_callback/3_Parameter_with_callback.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ void setup() {
3030
Serial.begin(115200);
3131
Serial.print("\n*** Live Objects on Arduino MKR boards, revision ");
3232
Serial.print(SW_REVISION);
33-
Serial.println("***");
33+
Serial.println(" ***");
3434

3535
// Declaring a parameter with a callback function 'processMsgRate'.
3636
// This function will be called after the update of the variable 'messageRate'.

examples/3_Parameter_with_callback/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ This is how callback function will look like:<br>
1616
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then:
1717
1. Open "3_parameter_with_callback.ino" sketch using Arduino IDE
1818
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="...";``` in arduino_secrets.h with API key you generated
19-
3. Upload *3_parameter_with_callback.ino* sketch to your Arduino MKR NB 1500 board
19+
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md**
20+
4. Upload *3_parameter_with_callback.ino* sketch to your Arduino MKR NB 1500 board
2021

2122

2223
## Verify

examples/4_Simple_command/4_Simple_command.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ unsigned long lastMessageTime = 0; // stores the time when last data message w
2121
void blinkLED5times(const String arguments, String &response) {
2222
pinMode(LED_BUILTIN, OUTPUT);
2323
for (byte i = 0; i < 5; i++) {
24-
digitalWrite(LED_BUILTIN, HIGH);
25-
delay(250);
2624
digitalWrite(LED_BUILTIN, LOW);
2725
delay(250);
26+
digitalWrite(LED_BUILTIN, HIGH);
27+
delay(250);
2828
}
2929
response = "{\"blinked\":\"5 times\"}";
3030
}
@@ -34,7 +34,7 @@ void setup() {
3434
Serial.begin(115200);
3535
Serial.print("\n*** Live Objects on Arduino MKR boards, revision ");
3636
Serial.print(SW_REVISION);
37-
Serial.println("***");
37+
Serial.println(" ***");
3838

3939
// Declaring a simple commands hadled by the function 'blinkLED5times'.
4040
lo.addCommand("blink", blinkLED5times);

examples/4_Simple_command/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ In this example we will use command to make Arduino onboard LED blink.
1111
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then:
1212
1. Open "4_simple_command.ino" sketch using Arduino IDE
1313
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="...";``` in arduino_secrets.h with API key you generated
14-
3. Upload *4_simple_command.ino* sketch to your Arduino MKR NB 1500 board
14+
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md**
15+
4. Upload *4_simple_command.ino* sketch to your Arduino MKR NB 1500 board
1516

1617
## Verify
1718
**Is device online:**<br>

examples/5_Command_with_arguments/5_Command_with_arguments.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ void blinkLED(const String arguments, String &response) {
3131
int timeOn = incomingArguments["time ON"]; // arguments are now accessible using their name
3232
int timeOff = incomingArguments["time OFF"];
3333
int reps = incomingArguments["repetitions"];
34-
unsigned long elaspedTime = millis(); // will keep track of time in order to compute the animation duration
34+
unsigned long elapsedTime = millis(); // will keep track of time in order to compute the animation duration
3535

3636
pinMode(LED_BUILTIN, OUTPUT);
3737
for (byte i = 0; i < reps; i++) {
38-
digitalWrite(LED_BUILTIN, HIGH);
39-
delay(timeOn);
4038
digitalWrite(LED_BUILTIN, LOW);
39+
delay(timeOn);
40+
digitalWrite(LED_BUILTIN, HIGH);
4141
delay(timeOff);
4242
}
4343

44-
elaspedTime = millis() - elaspedTime;
44+
elapsedTime = millis() - elapsedTime;
4545

4646
StaticJsonDocument<128> outgoingResponse; // creation of a JSON document that will hold the response
47-
outgoingResponse["animation duration (milliseconds)"] = elaspedTime; // adding reponse item (you can add several by repeating the line):
47+
outgoingResponse["animation duration (milliseconds)"] = elapsedTime; // adding reponse item (you can add several by repeating the line):
4848
serializeJson(outgoingResponse, response); // exporting JSON in 'reponse' String
4949
// example of 'response' content: "{\"animation duration (milliseconds)\":5000}"
5050
}
@@ -54,7 +54,7 @@ void setup() {
5454
Serial.begin(115200);
5555
Serial.print("\n*** Live Objects on Arduino MKR boards, revision ");
5656
Serial.print(SW_REVISION);
57-
Serial.println("***");
57+
Serial.println(" ***");
5858

5959
// Declaring a simple commands hadled by the function 'blinkLED'.
6060
lo.addCommand("blink", blinkLED);

examples/5_Command_with_arguments/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ In this example we will use command to make Arduino onboard LED blink. Unlike in
1111
First of all, be sure that you installed the required libraries and generated an API key mentioned in the main README file, then:
1212
1. Open "5_simple_command.ino" sketch using Arduino IDE
1313
2. Replace ```const char SECRET_LIVEOBJECTS_API_KEY[]="...";``` in arduino_secrets.h with API key you generated
14-
3. Upload *5_simple_command.ino* sketch to your Arduino MKR NB 1500 board
14+
3. In ```lo.setSecurity()``` select security mode using ```TLS``` or ```NONE``` according to board abilities shown in **Compatibility** point in main **README.md**
15+
4. Upload *5_simple_command.ino* sketch to your Arduino MKR NB 1500 board
1516

1617
## Verify
1718
**Is device online:**<br>

0 commit comments

Comments
 (0)