You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -22,17 +22,17 @@ The [Cloud4RPi library](http://platformio.org/lib/show/2045/cloud4rpi-esp-arduin
22
22
23
23
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))
24
24
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
+
```
36
36
3. Save the `platformio.ini` file and open the `src\main.cpp` file.
37
37
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 -->
38
38
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
61
61
4. Configure the installed libraries:
62
62
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)).
63
63
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
+
#defineMQTT_MAX_PACKET_SIZE 1024
66
+
#define MQTT_MAX_TRANSFER_SIZE 128
67
+
```
68
68
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.
69
69
5. Use the **File** | **Examples** | **cloud4rpi-esp-arduino** menu item to open the sample code. Restart Arduino IDE if this item does not appear.
70
70
5. Select the **ESP32 Dev Module** board in **Tools** menu.
0 commit comments