Skip to main content

CircuitPython library for the Sparkfun Qwiic Keypad

Project description

Introduction

Documentation Status Discord Build Status Code Style: Black

CircuitPython library for Sparkfun Qwiic 12 Button Keypad. This library is ported from SparkFun Qwiic Keypad Arduino Library

SparkFun Qwiic Keypad - 12 Button (COM-15290)

SparkFun Qwiic Keypad - 12 Button (COM-15290)

Dependencies

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.

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. To install for current user:

pip3 install sparkfun-circuitpython-qwiickeypad

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

sudo pip3 install sparkfun-circuitpython-qwiickeypad

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-qwiickeypad

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 qwiickeypad

Or the following command to update an existing version:

circup update

Usage Example

# import the CircuitPython board and busio libraries
import board
import sparkfun_qwiickeypad

# Create bus object using the board's I2C port
i2c = board.I2C()

keypad = QwiicKeypad(i2c)  # default address is 0x4B

# For a different address use QwiicKeypad(i2c, address)
# keypad = QwiicKeypad(i2c, 0x4A)

Upgrading

On supported GNU/Linux systems like the Raspberry Pi, you can upgrade the driver to the latest published version.

To upgrade for current user:

pip3 install --upgrade sparkfun-circuitpython-qwiicjoystick

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

sudo pip3 install --upgrade sparkfun-circuitpython-qwiicjoystick

Contributing

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

Documentation

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-qwiickeypad --library_location .

License Information

This product is open source!

Please review the LICENSE.md file for license information.

Please use, reuse, and modify these files as you see fit.

Please maintain the attributions to SparkFun Electronics and Adafruit and release any derivative under the same license.

Distributed as-is; no warranty is given.

Project details


Download files

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

Source Distribution

File details

Details for the file sparkfun-circuitpython-qwiickeypad-1.0.4.tar.gz.

File metadata

  • Download URL: sparkfun-circuitpython-qwiickeypad-1.0.4.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for sparkfun-circuitpython-qwiickeypad-1.0.4.tar.gz
Algorithm Hash digest
SHA256 b535f4241d16581afbe01b30eb99d04754954ac04c90dde090e59b8d3589c75a
MD5 c409d757570f02bf0eefc382d1df4ebe
BLAKE2b-256 435f6003b0fafa59b48f8e47b333a98f025df03483e9eb5b1ab37d100af22f67

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page