Hack-wipy-generalite

De MCHobby - Wiki
Sauter à la navigation Sauter à la recherche


MCHobby investit du temps et de l'argent dans la réalisation de traduction et/ou documentation. C'est un travail long et fastidieux réalisé dans l'esprit Open-Source... donc gratuit et librement accessible.
SI vous aimez nos traductions et documentations ALORS aidez nous à en produire plus en achetant vos produits chez MCHobby.

Pas de support virgule flottante

Il n'y a pas de support pour les opérations en virgule flottante (floating point) sur WiPy.

Due to space reasons, there’s no floating point support, and no math module. This means that floating point numbers cannot be used anywhere in the code, and that all divisions must be performed using ‘//’ instead of ‘/’. Example:

>>> r = 4 // 2  # this will work
>>> r = 4 / 2   # this WON'T

Avant de mettre sous tension

Config réseau (WLAN) par défaut

When the WiPy boots with the default factory configuration starts in Access Point mode with ssid that starts with: wipy-wlan and key: www.wipy.io . Connect to this network and the WiPy will be reachable at 192.168.1.1 . In order to gain access to the interactive prompt, open a telnet session to that IP address on the default port (23). You will be asked for credentials: login: micro and password: python

REPL Telnet

Linux stock telnet works like a charm (also on OSX), but other tools like putty work quite well too. The default credentials are: user: micro, password: python. See network.server (micropython.org) for info on how to change the defaults.

For instance, on a linux shell (when connected to the WiPy in AP mode):

$ telnet 192.168.1.1

Système de fichier et accès FTP

There is a small internal file system (a drive) on the WiPy, called /flash, which is stored within the external serial flash memory. If a micro SD card is hooked-up and mounted, it will be available as well.

When the WiPy starts up, it always boots from the boot.py located in the /flash file system.

The file system is accessible via the native FTP server running in the WiPy. Open your FTP client of choice and connect to:

url: ftp://192.168.1.1, utilisateur: micro, mot de passe: python

See network.server (micropython.org) for info on how to change the defaults. The recommended clients are: Linux stock FTP (also in OSX), Filezilla and FireFTP. For example, on a linux shell:

$ ftp 192.168.1.1

The FTP server on the WiPy doesn’t support active mode, only passive, therefore, if using the native unix ftp client, just after logging in do:

ftp> passive

Besides that, the FTP server only supports one data connection at a time. Check out the Filezilla settings section below for more info.

Configuration FileZilla

Do not use the quick connect button, instead, open the site manager and create a new configuration.

In the General tab make sure that encryption is set to: Only use plain FTP (insecure). In the Transfer Settings tab limit the max number of connections to one, otherwise FileZilla will try to open a second command connection when retrieving and saving files, and for simplicity and to reduce code size, only one command and one data connections are possible. Other FTP clients might behave in a similar way.

Mise-à-jour du FirmWare

OTA (Over The Air) software updates can be performed through the FTP server.

Upload the mcuimg.bin file to: /flash/sys/mcuimg.bin it will take around 6s. You won’t see the file being stored inside /flash/sys/ because it’s actually saved bypassing the user file system, so it ends up inside the internal hidden file system, but rest assured that it was successfully transferred, and it has been signed with a MD5 checksum to verify its integrity. Now, reset the WiPy by pressing the switch on the board, or by typing:

>>> import machine
>>> machine.reset()

Software updates can be found in: https://github.com/wipy/wipy/releases (Binaries.zip). It’s always recommended to update to the latest software, but make sure to read the release notes before.

In order to check your software version, do:

>>> import os
>>> os.uname().release

If the version number is lower than the latest release found in the releases, go ahead and update your WiPy!

Boot Modes et Safe boot

If you power up normally, or press the reset button, the WiPy will boot into standard mode; the boot.py file will be executed first, then main.py will run.

xxx



Tutoriel WiPy tutorials and examples & general information about WiPy sous copyright de Damien George et contributeurs en ce qui concerne MicroPython et/ou PyCom en ce qui concerne les informations relatives a WiPy et LoPy.

Tutoriel traduit par Meurisse D. pour MCHobby.be

Traduit avec l'autorisation de micropython.org - Translated with the authorisation of micropython.org également avec l'accord de Daniel Compara (créateur de WiPy).

Toute référence, mention ou extrait de cette traduction doit être explicitement accompagné du texte suivant : «  Traduction par MCHobby (www.MCHobby.be) - Vente de kit et composants » avec un lien vers la source (donc cette page) et ce quelque soit le média utilisé.

L'utilisation commercial de la traduction (texte) et/ou réalisation, même partielle, pourrait être soumis à redevance. Dans tous les cas de figures, vous devez également obtenir l'accord du(des) détenteur initial des droits. Celui de MC Hobby s'arrêtant au travail de traduction proprement dit.