https://github.com/sparkfun/qwiic_micro_oled_py
Python package for the qwiic Micro OLED board
https://github.com/sparkfun/qwiic_micro_oled_py
display oled python python3 qwiic sparkfun
Last synced: 3 months ago
JSON representation
Python package for the qwiic Micro OLED board
- Host: GitHub
- URL: https://github.com/sparkfun/qwiic_micro_oled_py
- Owner: sparkfun
- License: mit
- Created: 2019-06-21T22:39:23.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T20:51:19.000Z (6 months ago)
- Last Synced: 2025-03-28T09:36:24.486Z (4 months ago)
- Topics: display, oled, python, python3, qwiic, sparkfun
- Language: Python
- Size: 73.2 KB
- Stars: 2
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Qwiic_Micro_OLED_Py
===================
![]()
![]()
Python package for the qwiic [Micro OLED board](https://www.sparkfun.com/products/14532)
This package is a port of the [SparkFun Micro OLED Breakout Arduino Library](https://github.com/sparkfun/SparkFun_Micro_OLED_Arduino_Library)
This package can be used in conjunction with the overall [SparkFun qwiic Python Package](https://github.com/sparkfun/Qwiic_Py)
New to qwiic? Take a look at the entire [SparkFun qwiic ecosystem](https://www.sparkfun.com/qwiic).
## Contents
* [Supported Platforms](#supported-platforms)
* [Dependencies](#dependencies)
* [Installation](#installation)
* [Documentation](#documentation)
* [Example Use](#example-use)Supported Platforms
--------------------
The qwiic Python package current supports the following platforms:
* [Raspberry Pi](https://www.sparkfun.com/search/results?term=raspberry+pi)
* [NVidia Jetson Nano](https://www.sparkfun.com/products/15297)
* [Google Coral Development Board](https://www.sparkfun.com/products/15318)Dependencies
================
This driver package depends on the qwiic I2C driver: [Qwiic_I2C_Py](https://github.com/sparkfun/Qwiic_I2C_Py)This package depends on the OLED display driver base package: [Qwiic_OLED_Base_Py](https://github.com/sparkfun/Qwiic_OLED_Base_Py)
Documentation
-------------
The SparkFun qwiic Micro OLED module documentation is hosted at [ReadTheDocs](https://qwiic-micro-oled-py.readthedocs.io/en/latest/index.html)Installation
--------------### PyPi Installation
This repository is hosted on PyPi as the [sparkfun-qwiic-micro-oled](https://pypi.org/project/sparkfun-qwiic-micro-oled/) package. On systems that support PyPi installation via pip, this library is installed using the following commandsFor all users (note: the user must have sudo privileges):
```sh
sudo pip install sparkfun-qwiic-micro-oled
```
For the current user:```sh
pip install sparkfun_qwiic_micro_oled
```### Local Installation
To install, make sure the setuptools package is installed on the system.Direct installation at the command line:
```sh
python setup.py install
```To build a package for use with pip:
```sh
python setup.py sdist
```
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
```sh
cd dist
pip install sparkfun_micro_oled-.tar.gz
```
Example Use
------------
See the examples directory for more detailed use examples.```python
import qwiic_micro_oled
import sysdef runExample():
# These three lines of code are all you need to initialize the
# OLED and print the splash screen.
# Before you can start using the OLED, call begin() to init
# all of the pins and configure the OLED.print("\nSparkFun Micro OLED - Hello Example\n")
myOLED = qwiic_micro_oled.QwiicMicroOled()if myOLED.is_connected() == False:
print("The Qwiic Micro OLED device 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()
```
![]()