Mobile App(html5) <-->Arduino

If the purpose is only to turn on/off a relay you don't really need html5 just a small html page, with link towards on and off in it, depending on the current status of relay.

http://.../relay1 turns relay on, http://../relay0 turns it off.

If the page is small and the program simple, HTML output can be stored as progmem strings, at least 10 kbytes should be available in program flash

So it can be done but rudimentary.


The problem with HTML5, complicated pages with images and big javascript libraries is it becomes problematic:

  • with space on a very small device that must implement the HTTP server.
  • with the number of simultaneous connected sockets, ESP8266 as I recall will be able to respond to 4 or 5 simultaneous connections, a complex page with many images and JS libraries in separate files, the browser may try to open multiple sockets to grab all page components simultaneously.

If you move the HTML images and libraries on a separate HTTP server on a PC or PI, then you may also move all http and app logic complexity on that server and use a simpler, single-line communication between HTTP server app and arduino.