Skip to content

Commit

Permalink
add micropython wifi
Browse files Browse the repository at this point in the history
  • Loading branch information
wemos committed Apr 15, 2022
1 parent 13c1fbd commit 642e4c0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
3 changes: 1 addition & 2 deletions docs/en/c3/c3_mini.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ About WIFI
----------------------
You need set WIFI Tx Power to 8.5dBm to use WIFI.

More:

* `Arduino <../tutorials/c3/get_started_with_arduino_c3.html#wifi>`_

* `MicroPython <../tutorials/c3/get_started_with_micropython_c3.html#wifi>`_

Technical specs
----------------------
Expand Down
24 changes: 23 additions & 1 deletion docs/en/tutorials/c3/get_started_with_micropython_c3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ Requirements
C3 Firmware
------------------

* `C3 Mini Firmware <https://micropython.org/download/LOLIN_C3_MINI/>`_
.. * `C3 Mini Firmware <https://micropython.org/download/LOLIN_C3_MINI/>`_
* `C3 Mini Firmware <https://github.com/wemos/micropython/releases/download/untagged-760cc64a48d672e27e73/firmware.bin>`_


Flash firmware
Expand All @@ -51,6 +52,27 @@ Flash firmware
In Windows, **PORT_NAME** is like COM4.


WIFI
------------------
You need set WIFI Tx Power to 8.5dBm to use WIFI.

Use **sta_if.config(txpower=8.5)** after **sta_if.active(True)**

.. code-block:: python
def do_connect():
import network
sta_if = network.WLAN(network.STA_IF)
if not sta_if.isconnected():
print('connecting to network...')
sta_if.active(True)
sta_if.config(txpower=8.5)
sta_if.connect('ssid', 'passwd')
while not sta_if.isconnected():
pass
print('network config:', sta_if.ifconfig())
Quick reference
-------------------------
* `Quick reference for the ESP32 <https://docs.micropython.org/en/latest/esp32/quickref.html>`_
Expand Down

0 comments on commit 642e4c0

Please sign in to comment.