Modifications

Sauter à la navigation Sauter à la recherche
1 094 octets ajoutés ,  22 mai 2016 à 18:54
Page créée avec « {{WIPY-NAV}} {{traduction}} == Configuration WLAN étape par étape == The WLAN is a system feature of the WiPy, therefore it is always enabled (even while in {{fname|ma... »
{{WIPY-NAV}}

{{traduction}}

== Configuration WLAN étape par étape ==
The WLAN is a system feature of the WiPy, therefore it is always enabled (even while in {{fname|machine.SLEEP}}), except when deepsleep mode is entered.

In order to retrieve the current WLAN instance, do:

<syntaxhighlight lang="python">
>>> from network import WLAN
>>> wlan = WLAN() # we call the constructor without params
</syntaxhighlight>

You can check the current mode (which is always {{fname|WLAN.AP}} after power up):

<syntaxhighlight lang="python">
>>> wlan.mode()
</syntaxhighlight>

{{ambox-stop|text=When you change the WLAN mode following the instructions below, your WLAN connection to the WiPy will be broken. This means you will not be able to run these commands interactively over the WLAN.

There are two ways around this:
* put this setup code into your [https://micropython.org/resources/docs/en/latest/wipy/wipy/general.html#wipy-filesystem boot.py] file so that it gets executed automatically after reset.
* duplicate the REPL on UART, so that you can run commands via USB.
}}

{{WIPY-TRAILER}}
29 922

modifications

Menu de navigation