2020-11-27 05:33:55 -05:00
|
|
|
//
|
|
|
|
// FILE: XMLWriterPrint_4.ino
|
|
|
|
// AUTHOR: Rob Tillaart
|
|
|
|
// PURPOSE: demo Print interface - PROGMEM strings
|
|
|
|
// DATE: 2020-07-07
|
|
|
|
// URL: https://github.com/RobTillaart/XMLWriter
|
|
|
|
|
2021-11-11 14:36:58 -05:00
|
|
|
|
2020-11-27 05:33:55 -05:00
|
|
|
#include <XMLWriter.h>
|
|
|
|
|
|
|
|
XMLWriter XML(&Serial);
|
|
|
|
|
2021-12-29 10:27:03 -05:00
|
|
|
#define NUMBERZ (F("1.2.3.4.5"))
|
2020-11-27 05:33:55 -05:00
|
|
|
|
2021-11-11 14:36:58 -05:00
|
|
|
|
2020-11-27 05:33:55 -05:00
|
|
|
void setup()
|
|
|
|
{
|
|
|
|
Serial.begin(115200);
|
|
|
|
XML.setConfig(XMLWRITER_COMMENT | XMLWRITER_INDENT);
|
|
|
|
XML.header();
|
|
|
|
XML.comment("XMLWriter Print interface - PROGMEM F macro");
|
|
|
|
XML.tagOpen("P");
|
|
|
|
XML.tagOpen("F Macro");
|
|
|
|
XML.indent();
|
|
|
|
XML.println(F("string from PROGMEM"));
|
|
|
|
XML.tagClose();
|
|
|
|
XML.tagOpen("F Macro");
|
|
|
|
XML.indent();
|
|
|
|
XML.println(NUMBERZ);
|
|
|
|
XML.tagClose();
|
|
|
|
XML.tagClose();
|
|
|
|
XML.flush();
|
|
|
|
}
|
|
|
|
|
2021-11-11 14:36:58 -05:00
|
|
|
|
2020-11-27 05:33:55 -05:00
|
|
|
void loop()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-11-11 14:36:58 -05:00
|
|
|
|
2020-11-27 05:33:55 -05:00
|
|
|
// -- END OF FILE --
|
2021-12-29 10:27:03 -05:00
|
|
|
|