Add upip installation for Picoweb. Remove Pyboard D info.

pull/12/head
Peter Hinch 2019-06-03 08:48:37 +01:00
rodzic a3a394c1b7
commit 446bb69525
2 zmienionych plików z 34 dodań i 10 usunięć

Wyświetl plik

@ -8,16 +8,46 @@ This repo aims to clarify the installation process. Paul Sokolovsky's Picoweb
code is unchanged. The demos are trivially changed to use IP '0.0.0.0' and port
80.
To install on a hardware platform such as ESP32 or Pyboard D it is necessary to
copy this directory and its contents (including subdirectories) to the target.
If using `rshell` on an ESP32 change to this directory, at the `rshell` prompt
issue
Two ways of installing Picoweb are available: copying this directory to the
target or using `upip`. To use `upip` you should ensure your firmware is V1.11
or later; your target will also require an internet connection.
## Installing using upip
Copy the `picoweb` subdirectory of this repo's `PicoWeb` directory, with its
contents, to the target. If using `rshell` to connect to a Pyboard D this would
be done with:
```
/my/tree/PicoWeb> cp -r picoweb/ /flash
```
Check whether your target has `uasyncio` pre-installed:
```
>>> import uasyncio
>>>
```
If this throws an `ImportError`, you will need to install `uasyncio`.
Ensure your target is connected to the internet. Then perform the following
steps. The first step may be omitted if `uasyncio` is already installed.
```
upip.install('micropython-uasyncio')
upip.install('micropython-ulogging')
upip.install('micropython-pkg_resources')
upip.install('utemplate')
```
## Installing by copying this archive
Copy the contents of the `PicoWeb` directory (including subdirectories) to the
target. If using `rshell` on an ESP32 change to this directory, at the `rshell`
prompt issue
```
/my/tree/PicoWeb> rsync . /pyboard
```
This may take some time: 1 minute here on ESP32.
# Running Picoweb
At the REPL connect to the network and determine your IP address
```
>>> import network

Wyświetl plik

@ -124,12 +124,6 @@ The set and the array are different ways of viewing a bitmap implemented as a
bytearray: e.g. if max_value is 255 the bytearray occupies 32 bytes allocated by
the constructor.
# Pyboard D
Note: official docs may now be found [here](https://pybd.io/hw/pybd_sfxw.html).
This [unofficial guide](./pyboard_d/README.md) now contains little which is not
in the official docs and will shortly be removed.
# A design for a hardware power meter
This uses a Pyboard to measure the power consumption of mains powered devices.