Skip to content

Commit 4338b25

Browse files
authored
Update default data sending interval (#10)
* udpate default data sending interval * update keywords * Update README.md
1 parent 9f7dbfa commit 4338b25

File tree

5 files changed

+23
-19
lines changed

5 files changed

+23
-19
lines changed

Diff for: README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,17 @@ The [Cloud4RPi library](http://platformio.org/lib/show/2045/cloud4rpi-esp-arduin
2222

2323
1. Create a new PlatformIO project for your board as described in the PlatformIO documentation ([Visual Studio Code](http://docs.platformio.org/en/latest/ide/vscode.html#id3), [Atom](http://docs.platformio.org/en/latest/ide/atom.html#setting-up-the-project))
2424
2. Open your `platformio.ini` and add the following lines to the end:
25-
```
26-
lib_deps =
27-
cloud4rpi-esp-arduino
28-
29-
build_flags=
30-
; Required for PubSub library
31-
-D MQTT_MAX_PACKET_SIZE=1024
32-
-D MQTT_MAX_TRANSFER_SIZE=128
33-
; Enables the verbose output to Serial
34-
-D CLOUD4RPI_DEBUG=1
35-
```
25+
```
26+
lib_deps =
27+
cloud4rpi-esp-arduino
28+
29+
build_flags=
30+
; Required for PubSub library
31+
-D MQTT_MAX_PACKET_SIZE=1024
32+
-D MQTT_MAX_TRANSFER_SIZE=128
33+
; Enables the verbose output to Serial
34+
-D CLOUD4RPI_DEBUG=1
35+
```
3636
3. Save the `platformio.ini` file and open the `src\main.cpp` file.
3737
4. Copy-paste the sample code ([ESP8266](https://github.com/cloud4rpi/cloud4rpi-esp-arduino/blob/master/examples/ESP8266/ESP8266.ino), [ESP32](https://github.com/cloud4rpi/cloud4rpi-esp-arduino/blob/master/examples/ESP32/ESP32.ino)). <!-- common part begins here -->
3838
5. [Log in to your Cloud4RPi account](https://cloud4rpi.io/signin) or [create a new one](https://cloud4rpi.io/register).
@@ -61,10 +61,10 @@ The [Cloud4RPi library](http://platformio.org/lib/show/2045/cloud4rpi-esp-arduin
6161
4. Configure the installed libraries:
6262
1. Open the `%HOMEPATH%\Documents\Arduino\libraries\PubSubClient\src\PubSubClient.h` (`~/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.h` on Mac) file with any text editor (for instance, [VS Code](https://code.visualstudio.com)).
6363
2. Add the following define directives at the beginning:
64-
```c
65-
#define MQTT_MAX_PACKET_SIZE 1024
66-
#define MQTT_MAX_TRANSFER_SIZE 128
67-
```
64+
```c
65+
#define MQTT_MAX_PACKET_SIZE 1024
66+
#define MQTT_MAX_TRANSFER_SIZE 128
67+
```
6868
3. [Optional] Open the `%HOMEPATH%\Documents\Arduino\libraries\cloud4rpi-esp-arduino\src\Cloud4RPi.h` (`~/Documents/Arduino/libraries/cloud4rpi-esp-arduino/src/Cloud4RPi.h` on Mac) file and add the `#define CLOUD4RPI_DEBUG 1` line at the beginning to enable verbose output.
6969
5. Use the **File** | **Examples** | **cloud4rpi-esp-arduino** menu item to open the sample code. Restart Arduino IDE if this item does not appear.
7070
5. Select the **ESP32 Dev Module** board in **Tools** menu.

Diff for: examples/control/control.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ char wifiPassword[] = "__PASSWORD__";
1515
#define LED_BUILTIN 2
1616
#endif
1717

18-
const int dataSendingInterval = 30000; // milliseconds
18+
// Decrease this value for testing purposes.
19+
const int dataSendingInterval = 300000; // milliseconds
1920
const int diagSendingInterval = 60000; // milliseconds
2021
unsigned long lastDataSent = 0;
2122
unsigned long lastDiagSent = 0;

Diff for: keywords.txt

+3
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ connected KEYWORD2
1818
declareBoolVariable KEYWORD2
1919
declareNumericVariable KEYWORD2
2020
declareStringVariable KEYWORD2
21+
declareDiagVariable KEYWORD2
2122
getBoolValue KEYWORD2
2223
getNumericValue KEYWORD2
2324
getStringValue KEYWORD2
25+
getDiagValue KEYWORD2
2426
setVariable KEYWORD2
2527
publishConfig KEYWORD2
2628
publishData KEYWORD2
29+
publishDiag KEYWORD2
2730
loop KEYWORD2
2831
printLogo KEYWORD2
2932

Diff for: library.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cloud4rpi-esp-arduino",
3-
"keywords": "arduino, nodemcu, esp8266, esp32, mqtt, iot, cloud",
3+
"keywords": "arduino, nodemcu, esp8266, esp32, mqtt, iot, cloud, dashboard, control panel, sensors, device",
44
"description": "Cloud4RPi client library for ESP8266 and ESP32 based boards",
55
"repository":
66
{
@@ -23,7 +23,7 @@
2323
"build": {
2424
"flags": "-DMQTT_MAX_PACKET_SIZE=1024 -DMQTT_MAX_TRANSFER_SIZE=128"
2525
},
26-
"version": "0.0.8",
26+
"version": "0.0.9",
2727
"examples": "examples/*/*.ino",
2828
"frameworks": "arduino",
2929
"platforms": [

Diff for: library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=cloud4rpi-esp-arduino
2-
version=0.0.8
2+
version=0.0.9
33
author=Cloud4RPi <[email protected]>
44
maintainer=Cloud4RPi <[email protected]>
55
sentence=Connect a board to the Cloud4RPi control panel using MQTT - https://cloud4rpi.io.

0 commit comments

Comments
 (0)