Skip to content

Working CPython 3 support (tested with 3.8.10) #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@ Files starting with **nodemcu_** were tested on a
The files containing **adafruit_lcd** were tested on an Adafruit
[I2C / SPI character LCD backpack](https://www.adafruit.com/product/292)

## Installing CPython

### Cpython 3.x

# python smbus needs dev headers
sudo apt update
sudo apt install python3-dev
python -m pip install smbus # optional, good test before installing library
python -m pip install -e .


### Cpython 2.7

# python smbus needs dev headers
sudo apt update
sudo apt install python2-dev
python -m pip install smbus # optional, good test before installing library
python -m pip install -e .


## Tutorial

Giuseppe Cassibba wrote up a [tutorial](https://peppe8o.com/using-i2c-lcd-display-with-raspberry-pi-pico-and-micropython) which demonstrates connecting an I2C LCD to a Raspberry Pi Pico.
Expand Down
6 changes: 4 additions & 2 deletions lcd/i2c_lcd.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
"""Implements a HD44780 character LCD connected via PCF8574 on I2C."""

from lcd_api import LcdApi
import smbus
import time

import smbus

from .lcd_api import LcdApi

# The PCF8574 has a jumper selectable address: 0x20 - 0x27
DEFAULT_I2C_ADDR = 0x27

Expand Down