Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
cskarai authored and tve committed Oct 1, 2016
1 parent 983fd54 commit f8eb0aa
Showing 1 changed file with 32 additions and 16 deletions.
48 changes: 32 additions & 16 deletions WEB-SERVER.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
ESP-LINK web-server tutorial
============================

Installing el-client Arduino library
--------------------

Download and install ELClient library.

https://github.com/jeelabs/el-client

LED flashing sample
--------------------

Expand All @@ -13,32 +20,41 @@ Circuit:

Installation steps:

- 1: install the latest Arduino on the PC
- 2: install EspLink library from arduino/libraries path
- 3: open EspLinkWebSimpleLedControl sample from Arduino
- 4: upload the code onto an Arduino Nano/Uno
- 5: install esp-link
- 6: jump to the Web Server page on esp-link UI
- 7: upload SimpleLED.html ( arduino/libraries/EspLink/examples/EspLinkWebSimpleLedControl/SimpleLED.html )
- 8: jump to SimpleLED page on esp-link UI
- 9: turn on/off the LED

Complex application sample
- 1: open webserver_led ELClient sample file in Arduino
- 2: upload the code onto an Arduino Nano/Uno
- 3: open the Web Server page on esp-link UI
- 4: upload LED.html from webserver_led ( ELCient/examples/webserver_led/LED.html )
- 5: choose LED page on esp-link UI
- 6: turn on/off the LED

HTML controls sample
--------------------------

Circuit:

- 1: connect a Nodemcu (ESP8266) board and an Arduino Nano / UNO:
(RX - levelshifter - TX, TX - levelshifter - RX)
- 2: optionally connect RESET-s with a level shifter
- 3: add a trimmer to A0 for Voltage measurement
- 3: add a trimmer to A0 for voltage measurement

Installation steps:

- 1: open EspLinkWebApp sample from Arduino
- 1: open webserver_controls ELClient sample file in Arduino
- 2: upload the code onto an Arduino Nano/Uno
- 3: jump to the Web Server page on esp-link UI
- 4: upload the 3 HTML files in the samples ( multiple select from arduino/libraries/EspLink/examples/EspLinkWebApp/ )
- 3: open the Web Server page on esp-link UI
- 4: upload the 3 HTML files from webserver_controls ( select multiple htmls from ELCient/examples/webserver_controls/ )
- 5: jump to LED/User/Voltage pages
- 6: try out different settings


Supported HTML controls
--------------------

HTML control       | Value Type | Description | Form Submission |
------------------------ | ----- | ------------ | ------- |
&lt;p id="id"/&gt; <br/> &lt;div id="id"/&gt; <br/> &lt;tr id="id"/&gt; <br/> &lt;th id="id"/&gt; <br/> &lt;td id="id"/&gt; <br/> &lt;textarea id="id"/&gt; | String&nbsp;(HTML) | MCU can replace the inner HTML part of the control at LOAD/REFRESH queries. The string (sent by MCU) is handled as HTML, so &lt;img...&gt; will be displayed as an image on the page | NO |
&lt;button id="id"/&gt; | String | When button is pressed, a message is transmitted to MCU containing the id (BUTTON_PRESS) | NO |
&lt;input name="id"/&gt; | String <br/> Integer <br/> Float <br/> Boolean | MCU can replace the value or checked properties of the HTML control in the form (LOAD/REFRESH). At form submission, the content of value will be transmitted to MCU (SET_FIELD). | YES |
&lt;select name="id"/&gt; | String | MCU can choose a value from the drop down (LOAD/REFRESH). At form submission the currently selected value will be transmitted to MCU (SET_FIELD) | YES |
&lt;ul id="id"/&gt; <br/> &lt;ol id="id"/&gt; | JSON list <br/> ["1","2","3"] | MCU can send a JSON list which is transformed to an HTML list ( &lt;li/&gt; ) (LOAD/REFRESH) | NO |
&lt;table id="id"/&gt; | JSON table <br/> [["1","2"], <br/> ["3","4"]] | MCU sends a JSON table which is transformed to an HTML table (LOAD/REFRESH) | NO |

0 comments on commit f8eb0aa

Please sign in to comment.