Skip to content

sparkfun/Qwiic_Large_OLED_Py

Repository files navigation

Qwiic_Large_OLED_Py

follow on Twitter

SparkFun Qwiic OLED Display - (1.3in., 128x64)

The Python package for the Qwiic OLED - (1.3in., 128x64) board.

This package is a port of the SparkFun Micro OLED Breakout Arduino Library

This package can be used in conjunction with the overall SparkFun qwiic Python Package

New to qwiic? Take a look at the entire SparkFun qwiic ecosystem.

Contents

Supported Platforms

The qwiic Python package current supports the following platforms:

Dependencies

This driver package depends on the qwiic I2C driver: Qwiic_I2C_Py

This package depends on the OLED display driver base package: Qwiic_OLED_Base_Py

Documentation

The SparkFun Qwiic OLED Display module documentation is hosted at ReadTheDocs

Installation

PyPi Installation

This repository is hosted on PyPi as the sparkfun-qwiic-large-oled package. On systems that support PyPi installation via pip, this library is installed using the following commands

For all users (note: the user must have sudo privileges):

sudo pip install sparkfun-qwiic-large-oled

For the current user:

pip install sparkfun_qwiic_large_oled

Local Installation

To install, make sure the setuptools package is installed on the system.

Direct installation at the command line:

python setup.py install

To build a package for use with pip:

python setup.py sdist

A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.

cd dist
pip install sparkfun_oled_display-<version>.tar.gz

Example Use

This example is intended to be used with the Qwiic OLED - (1.3in., 128x64) board. (See the examples directory for more detailed use cases.)

import qwiic_large_oled
import sys


def runExample():

    #  These lines of code are all you need to initialize the OLED display and print text on the screen.
  
    print("\nSparkFun Qwiic OLED Display - Hello Example\n")
    myOLED = qwiic_large_oled.QwiicLargeOled()

    if myOLED.is_connected() == False:
        print("The Qwiic OLED Display isn't connected to the system. Please check your connection", \
            file=sys.stderr)
        return
    
    #  Before you can start using the OLED, call begin() to init all of the pins and configure the OLED.
    myOLED.begin()

    myOLED.clear(myOLED.PAGE)  #  Clear the display's buffer

    myOLED.print("Hello World")  #  Add "Hello World" to buffer

    #  To actually draw anything on the display, you must call the display() function. 
    myOLED.display()

runExample()

SparkFun - Start Something

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages