mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Fixed example JsonConfigFile.ino for ESP8266
				
					
				
			This commit is contained in:
		| @@ -5,6 +5,7 @@ HEAD | |||||||
| ---- | ---- | ||||||
|  |  | ||||||
| * Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis) | * Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis) | ||||||
|  | * Fixed example `JsonConfigFile.ino` for ESP8266 | ||||||
|  |  | ||||||
| v6.11.3 (2019-07-22) | v6.11.3 (2019-07-22) | ||||||
| ------- | ------- | ||||||
|   | |||||||
| @@ -11,6 +11,12 @@ | |||||||
| //   "port": 2731 | //   "port": 2731 | ||||||
| // } | // } | ||||||
| // | // | ||||||
|  | // To run this program, you need an SD card connected to the SPI bus as follows: | ||||||
|  | // * MOSI <-> pin 11 | ||||||
|  | // * MISO <-> pin 12 | ||||||
|  | // * CLK  <-> pin 13 | ||||||
|  | // * CS   <-> pin 4 | ||||||
|  | // | ||||||
| // https://arduinojson.org/v6/example/config/ | // https://arduinojson.org/v6/example/config/ | ||||||
|  |  | ||||||
| #include <ArduinoJson.h> | #include <ArduinoJson.h> | ||||||
| @@ -111,7 +117,8 @@ void setup() { | |||||||
|   while (!Serial) continue; |   while (!Serial) continue; | ||||||
|  |  | ||||||
|   // Initialize SD library |   // Initialize SD library | ||||||
|   while (!SD.begin()) { |   const int chipSelect = 4; | ||||||
|  |   while (!SD.begin(chipSelect)) { | ||||||
|     Serial.println(F("Failed to initialize SD library")); |     Serial.println(F("Failed to initialize SD library")); | ||||||
|     delay(1000); |     delay(1000); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user