Skip to main content

CircuitPython driver library for the Sparkfun SerLCD displays

Project description


This driver depends on:

Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.

Raspberry Pi Setup

Adafruit has an excellent tutorial on Installing CircuitPython Libraries on Raspberry Pi. You can purchase one from the Adafruit shop

Quick Start Summary:

  • Start with the latest version of Raspbian with Wifi configured.
  • Enable SSH, I2C and SPI.
sudo raspi-config
  • Update your system to the latest version.
sudo apt-get update
sudo apt-get upgrade
  • Update the python tools
sudo pip3 install --upgrade setuptools

(If pip3 is not installed, install it and rerun the command)

sudo apt-get install python3-pip
  • Install the CircuitPython libraries
pip3 install RPI.GPIO
pip3 install adafruit-blinka

Installing from PyPI

On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. Installing this library will also install the dependency adafruit-circuitpython-busdevice.

To install for current user:

pip3 install sparkfun-circuitpython-serlcd

To install system-wide (this may be required in some cases):

sudo pip3 install sparkfun-circuitpython-serlcd

To install in a virtual environment in your current project:

mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install sparkfun-circuitpython-serlcd

Installing to a Connected CircuitPython Device with Circup

Make sure that you have circup installed in your Python environment. Install it with the following command if necessary:

pip3 install circup

With circup installed and your CircuitPython device connected use the following command to install:

circup install serlcd

Or the following command to update an existing version:

circup update

Usage Example

# import the CircuitPython board and busio libraries
import board

# Enable I2C (Qwiic) communication
from sparkfun_serlcd import Sparkfun_SerLCD_I2C
i2c = board.I2C()
serlcd = Sparkfun_SerLCD_I2C(i2c)

# Enable SPI communication
#import digitalio
#from sparkfun_serlcd import Sparkfun_SerLCD_SPI
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
# Set up chip select, CE0 or D8 is labeled CS on Sparkfun Pi Hat
#cs = digitalio.DigitalInOut(board.CE0)
#cs.direction = digitalio.Direction.OUTPUT
#serlcd = Sparkfun_SerLCD_SPI(spi, cs)

# Enable UART Serial communication
# SerLCD is connected to the RPi via a USB to TTL 3.3v Serial Cable:
#import serial
#from sparkfun_serlcd import Sparkfun_SerLCD_UART
#usb0 = serial.Serial(
#        port='/dev/ttyUSB0',
#        baudrate = 9600,
#        parity=serial.PARITY_NONE,
#        stopbits=serial.STOPBITS_ONE,
#        bytesize=serial.EIGHTBITS,
#        timeout=1)
#serlcd = Sparkfun_SerLCD_UART(usb0)


Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.


For information on building library documentation, please check out this guide.

Building locally

Zip release files

To build this library locally you’ll need to install the circuitpython-build-tools package.

python3 -m venv .env
source .env/bin/activate
pip install circuitpython-build-tools

Once installed, make sure you are in the virtual environment:

source .env/bin/activate

Then run the build:

circuitpython-build-bundles --filename_prefix sparkfun-circuitpython-serlcd --library_location .

Sphinx documentation

Sphinx is used to build the documentation based on rST files and comments in the code. First, install dependencies (feel free to reuse the virtual environment from above):

python3 -m venv .env
source .env/bin/activate
pip install Sphinx sphinx-rtd-theme

Now, once you have the virtual environment activated:

cd docs
sphinx-build -E -W -b html . _build/html

This will output the documentation to docs/_build/html. Open the index.html in your browser to view them. It will also (due to -W) error out on any warning like Travis will. This is a good way to locally verify it will pass.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sparkfun-circuitpython-serlcd, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size sparkfun-circuitpython-serlcd-1.0.4.tar.gz (41.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page