Skip to content

Commit 540232e

Browse files
committed
updated example
1 parent f9e8a1d commit 540232e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/test/test.ino

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ const char* json_example_str = R"_JSON_STRING_(
6767
void setup()
6868
{
6969
Serial.begin(115200);
70-
delay(1000);
70+
delay(5000);
71+
Serial.print("Welcome to the YAML Test sketch\nRam free: ");
72+
Serial.print( HEAP_AVAILABLE() );
73+
Serial.println(" bytes");
74+
7175
const size_t yaml_str_size = strlen(yaml_example_str);
7276
const size_t json_str_size = strlen(json_example_str);
7377
int test_number = 1;
@@ -82,6 +86,7 @@ void setup()
8286

8387
YAML_LOG_n("YAML=>JSON and JSON=>YAML using ArduinoJson\n\n");
8488

89+
#if !defined ARDUINO_ARCH_SAMD // samd with 32kb ram can oom after this, so only enable for specific test
8590
{
8691
YAML_LOG_n( "[TEST #%d] YAML stream to JsonObject -> deserializeYml(json_doc, yaml_stream):", test_number++ );
8792
DynamicJsonDocument json_doc(yaml_str_size*2);
@@ -95,6 +100,7 @@ void setup()
95100
const size_t bytes_out = serializeJsonPretty( json_doc, Serial ); // print deserialized JsonObject
96101
YAML_LOG_n("[YAML=>JsonObject] yaml bytes in=%d, json bytes out=%d\n\n", yaml_str_size, bytes_out);
97102
}
103+
#endif
98104

99105

100106
{

0 commit comments

Comments
 (0)