I needed html/php-text in my arduino – esp8266 project. It was very annoying to escape nearly everything with \.
After searching quiet a while I found a fast solution.
const char text[] PROGMEM = R“=====(
you can write everything in here! Like that:
=^.^=
or <html></html>
IT DOESN’T MATTER! „‚!=“)§(§/$&%&“/§$(„)=§
)=====“;
Isn’t it nice?
Write in the comments what you think and if there is a better way.
UPDATE:
If you want to use it with an ESP and you want to set a String use:
const char * text PROGMEM = R“=====(
This is working fine as String.
I personally use it in a separate ino tab and include it as
extern String text;
to use it
Kommentar verfassen