@@ -15,6 +15,14 @@ It also manually connects to the WiFi network.
1515 :emphasize-lines: 12-17
1616 :linenos:
1717
18+ It is also possible to use Ethernet instead of WiFi.
19+ The only difference in usage is related to configuring the ``socket_source `` differently.
20+
21+ .. literalinclude :: ../examples/httpserver_ethernet_simpletest.py
22+ :caption: examples/httpserver_ethernet_simpletest.py
23+ :emphasize-lines: 13-23
24+ :linenos:
25+
1826Although there is nothing wrong with this approach, from the version 8.0.0 of CircuitPython,
1927`it is possible to use the environment variables <https://docs.circuitpython.org/en/latest/docs/environment.html#circuitpython-behavior >`_
2028defined in ``settings.toml `` file to store secrets and configure the WiFi network.
@@ -32,6 +40,7 @@ Note that we still need to import ``socketpool`` and ``wifi`` modules.
3240
3341.. literalinclude :: ../examples/httpserver_simpletest_auto.py
3442 :caption: examples/httpserver_simpletest_auto.py
43+ :emphasize-lines: 11
3544 :linenos:
3645
3746Serving static files
@@ -76,7 +85,7 @@ a running total of the last 10 samples.
7685
7786.. literalinclude :: ../examples/httpserver_start_and_poll.py
7887 :caption: examples/httpserver_start_and_poll.py
79- :emphasize-lines: 24,33
88+ :emphasize-lines: 29,38
8089 :linenos:
8190
8291Server with MDNS
@@ -145,7 +154,7 @@ Tested on ESP32-S2 Feather.
145154
146155.. literalinclude :: ../examples/httpserver_neopixel.py
147156 :caption: examples/httpserver_neopixel.py
148- :emphasize-lines: 25-27,39,51,60,66
157+ :emphasize-lines: 26-28,41,52,68,74
149158 :linenos:
150159
151160Form data parsing
@@ -293,7 +302,7 @@ This might change in the future, but for now, it is recommended to use Websocket
293302
294303.. literalinclude :: ../examples/httpserver_websocket.py
295304 :caption: examples/httpserver_websocket.py
296- :emphasize-lines: 10 ,16-17,60-67,76,81
305+ :emphasize-lines: 9 ,16-17,60-67,76,81
297306 :linenos:
298307
299308Multiple servers
0 commit comments