Skip to content

Commit 5a0107c

Browse files
update README with installation steps for mip [skip ci]
1 parent 27b3b72 commit 5a0107c

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ station.isconnected()
7373

7474
Install the latest package version of this lib on the MicroPython device
7575

76+
```python
77+
import mip
78+
mip.install("github:brainelectronics/micropython-i2c-lcd")
79+
```
80+
81+
For MicroPython versions below 1.19.1 use the `upip` package instead of `mip`
82+
7683
```python
7784
import upip
7885
upip.install('micropython-i2c-lcd')
@@ -82,6 +89,16 @@ upip.install('micropython-i2c-lcd')
8289

8390
Install a specific, fixed package version of this lib on the MicroPython device
8491

92+
```python
93+
import mip
94+
# install a verions of a specific branch
95+
mip.install("github:brainelectronics/micropython-i2c-lcd", version="feature/initial-implementation")
96+
# install a tag version
97+
mip.install("github:brainelectronics/micropython-i2c-lcd", version="0.1.0")
98+
```
99+
100+
For MicroPython versions below 1.19.1 use the `upip` package instead of `mip`
101+
85102
```python
86103
import upip
87104
upip.install('micropython-i2c-lcd==0.1.0')
@@ -94,11 +111,18 @@ Install a specific release candidate version uploaded to
94111
MicroPython device. If no specific version is set, the latest stable version
95112
will be used.
96113

114+
```python
115+
import mip
116+
mip.install("github:brainelectronics/micropython-i2c-lcd", version="0.1.0-rc3.dev1")
117+
```
118+
119+
For MicroPython versions below 1.19.1 use the `upip` package instead of `mip`
120+
97121
```python
98122
import upip
99123
# overwrite index_urls to only take artifacts from test.pypi.org
100124
upip.index_urls = ['https://test.pypi.org/pypi']
101-
upip.install('micropython-i2c-lcd==0.1.0rc1.dev2')
125+
upip.install('micropython-i2c-lcd==0.1.0rc3.dev1')
102126
```
103127

104128
### Manually

examples/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ def print_and_wait(text: str, sleep_time: int = 2) -> None:
4949
print_and_wait("Turn LCD backlight off")
5050

5151
# get current backlight value
52-
print_and_wait("Backlight value: {}".format(lcd.get_backlight()))
52+
print("Backlight value: {}".format(lcd.get_backlight()))
5353

5454
# turn LCD on
5555
lcd.backlight()
5656
print_and_wait("Turn LCD backlight on")
5757

5858
# get current backlight value
59-
print_and_wait("Backlight value: {}".format(lcd.get_backlight()))
59+
print("Backlight value: {}".format(lcd.get_backlight()))
6060

6161
# clear LCD display content
6262
lcd.clear()

0 commit comments

Comments
 (0)