Skip to content

Commit 0531ff7

Browse files
fixed installation instructions and inline comments
1 parent 986cde0 commit 0531ff7

File tree

5 files changed

+18
-10
lines changed

5 files changed

+18
-10
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
[![codecov](https://codecov.io/github/brainelectronics/micropython-i2c-lcd/branch/main/graph/badge.svg)](https://app.codecov.io/github/brainelectronics/micropython-i2c-lcd)
88
[![CI](https://github.com/brainelectronics/micropython-i2c-lcd/actions/workflows/release.yml/badge.svg)](https://github.com/brainelectronics/micropython-i2c-lcd/actions/workflows/release.yml)
99

10-
Micropython package to control HD44780 LCD displays 1602 and 2004 via I2C
10+
MicroPython package to control HD44780 LCD displays 1602 and 2004 via I2C
1111

1212
---------------
1313

1414
## General
1515

16-
Micropython package to control HD44780 LCD displays 1602 and 2004 via I2C
16+
MicroPython package to control HD44780 LCD displays 1602 and 2004 via I2C
1717

1818
📚 The latest documentation is available at
1919
[MicroPython I2C LCD ReadTheDocs][ref-rtd-micropython-i2c-lcd] 📚
@@ -65,6 +65,7 @@ Connect the MicroPython device to a network (if possible)
6565
```python
6666
import network
6767
station = network.WLAN(network.STA_IF)
68+
station.active(True)
6869
station.connect('SSID', 'PASSWORD')
6970
station.isconnected()
7071
```
@@ -158,13 +159,14 @@ cp examples/boot.py /pyboard
158159
from lcd_i2c import LCD
159160
from machine import I2C, Pin
160161

161-
I2C_ADDR = 0x27
162+
# PCF8574 on 0x50
163+
I2C_ADDR = 0x27 # DEC 39, HEX 0x27
162164
NUM_ROWS = 2
163165
NUM_COLS = 16
164166

165167
# define custom I2C interface, default is 'I2C(0)'
166168
# check the docs of your device for further details and pin infos
167-
i2c = I2C(1, scl=Pin(3), sda=Pin(2), freq=800_000)
169+
i2c = I2C(0, scl=Pin(13), sda=Pin(12), freq=800000)
168170
lcd = LCD(addr=I2C_ADDR, cols=NUM_COLS, rows=NUM_ROWS, i2c=i2c)
169171

170172
lcd.begin()

docs/EXAMPLES.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ An example of all implemented functionalities can be found at the
1515
from lcd_i2c import LCD
1616
from machine import I2C, Pin
1717

18+
# PCF8574 on 0x27
1819
I2C_ADDR = 0x27
1920
NUM_ROWS = 2
2021
NUM_COLS = 16
2122

2223
# define custom I2C interface, default is 'I2C(0)'
2324
# check the docs of your device for further details and pin infos
24-
i2c = I2C(1, scl=Pin(3), sda=Pin(2), freq=800_000)
25+
# this are the pins for the Raspberry Pi Pico adapter board
26+
i2c = I2C(0, scl=Pin(13), sda=Pin(12), freq=800000)
2527
lcd = LCD(addr=I2C_ADDR, cols=NUM_COLS, rows=NUM_ROWS, i2c=i2c)
2628

2729
# get LCD infos/properties

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Micropython package to control HD44780 LCD displays via I2C
1+
MicroPython package to control HD44780 LCD displays via I2C
22
===========================================================
33

44
Contents

examples/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
from machine import I2C, Pin
88
from time import sleep
99

10-
I2C_ADDR = 0x27
10+
# PCF8574 on 0x27
11+
I2C_ADDR = 0x27 # DEC 39, HEX 0x27
1112
I2C_NUM_ROWS = 2
1213
I2C_NUM_COLS = 16
1314
FREQ = 800000 # Try lowering this value in case of "Errno 5"
@@ -28,7 +29,8 @@ def print_and_wait(text: str, sleep_time: int = 2) -> None:
2829

2930
# define custom I2C interface, default is 'I2C(0)'
3031
# check the docs of your device for further details and pin infos
31-
i2c = I2C(1, scl=Pin(3), sda=Pin(2), freq=FREQ)
32+
# this are the pins for the Raspberry Pi Pico adapter board
33+
i2c = I2C(0, scl=Pin(13), sda=Pin(12), freq=FREQ)
3234
lcd = LCD(addr=I2C_ADDR, cols=I2C_NUM_COLS, rows=I2C_NUM_ROWS, i2c=i2c)
3335

3436
# get LCD infos/properties
@@ -155,4 +157,5 @@ def print_and_wait(text: str, sleep_time: int = 2) -> None:
155157

156158
# show custom char stored at location 0
157159
lcd.print(chr(0))
160+
lcd.print(chr(0))
158161
print_and_wait("Show custom char")

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
setup(
1717
name='micropython-i2c-lcd',
1818
version=__version__,
19-
description="Micropython package to control HD44780 LCD displays 1602 and 2004 ",
19+
description="MicroPython package to control HD44780 LCD displays 1602 and 2004",
2020
long_description=long_description,
2121
long_description_content_type='text/markdown',
2222
url='https://github.com/brainelectronics/micropython-i2c-lcd',
@@ -26,8 +26,9 @@
2626
'Development Status :: 4 - Beta',
2727
'Intended Audience :: Developers',
2828
'License :: OSI Approved :: MIT License',
29+
'Programming Language :: Python :: Implementation :: MicroPython',
2930
],
30-
keywords='micropython, HD44780, I2C, display, LCD1602, LCD2004',
31+
keywords='micropython, HD44780, I2C, display, LCD1602, LCD2004, PCF8574',
3132
project_urls={
3233
'Bug Reports': 'https://github.com/brainelectronics/micropython-i2c-lcd/issues',
3334
'Source': 'https://github.com/brainelectronics/micropython-i2c-lcd',

0 commit comments

Comments
 (0)