I'm developing a program that uses the HTML server in the WiFi101 library.
My hardware does not have SD card storage so all source html needs to be stored as strings in the sketch at compile time. To aid in development I want to keep my html files separate from the sketch and include them at compile time.
Is there a way to use #include in the Arduino IDE and assign the included file to a string/char array constant? If so can the path to the included file be relative to the sketch's path?
Notes: Similar question on Stack overflow: https://stackoverflow.com/questions/410980/include-a-text-file-in-a-c-program-as-a-char
Edit: There are lots of great answers here to solve this in a more robust fashion. The correct thing to do is setup a proper build system. If I were to set this up I'd be temped to try something like Gulp since you could easily minify/lint your web content. As this is a small project I ended up just running the HTML through a minifier service and copy/pasted into strings.
toneMelody
example in the IDE