8000 Fixed example `JsonConfigFile.ino` for ESP8266 · joglosemarduino/ArduinoJson@63d7d87 · GitHub
[go: up one dir, main page]

Skip to content

Commit 63d7d87

Browse files
committed
Fixed example JsonConfigFile.ino for ESP8266
1 parent 2ee655f commit 63d7d87

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ HEAD
55
----
66

77
* Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis)
8+
* Fixed example `JsonConfigFile.ino` for ESP8266
89

910
v6.11.3 (2019-07-22)
1011
-------

examples/JsonConfigFile/JsonConfigFile.ino

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
// "port": 2731
1212
// }
1313
//
14+
// To run this program, you need an SD card connected to the SPI bus as follows:
15+
// * MOSI <-> pin 11
16+
// * MISO <-> pin 12
17+
// * CLK <-> pin 13
18+
// * CS <-> pin 4
19+
//
1420
// https://arduinojson.org/v6/example/config/
1521

1622
#include <ArduinoJson.h>
@@ -111,7 +117,8 @@ void setup() {
111117
while (!Serial) continue;
112118

113119
// Initialize SD library
114-
while (!SD.begin()) {
120+
const int chipSelect = 4;
121+
while (!SD.begin(chipSelect)) {
115122
Serial.println(F("Failed to initialize SD library"));
116123
delay(1000);
117124
}

0 commit comments

Comments
 (0)
0