Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jkawamoto/i2cdisplay
A Python library for LCDs connected via I2C.
https://github.com/jkawamoto/i2cdisplay
Last synced: 13 days ago
JSON representation
A Python library for LCDs connected via I2C.
- Host: GitHub
- URL: https://github.com/jkawamoto/i2cdisplay
- Owner: jkawamoto
- License: mit
- Created: 2014-12-30T17:41:11.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-26T03:13:46.000Z (over 8 years ago)
- Last Synced: 2024-04-11T15:27:10.972Z (7 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
i2cdisplay
==========
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Code Climate](https://codeclimate.com/github/jkawamoto/i2cdisplay/badges/gpa.svg)](https://codeclimate.com/github/jkawamoto/i2cdisplay)A Python library for LCDs connected via I2C.
Now, this library supports LCDs with SpikenzieLabs's [MPTH](https://www.spikenzielabs.com/SpikenzieLabs/MPTH.html).Useage
------
Initialize with bus number `` and device address ``.
You can find those parameters by `sudo i2cdetect 0` and/or `sudo i2cdetect 1`.```python
d = MPTHDisplay(, )
```Then, you can write strings, new lines, and clear them.
```python
# Write a single string.
d.write("Hello")# Write a new line and another string.
d.newline()
d.write("MPTH")# Clear display.
d.clear()# Write multi strings.
d.writelines(["Hello", "world"])
```As a command
-------------
Basic formula is `./i2cdisplay.py {write|clear|cursor|backlight}`
where `` and `` are the bus number and address of the display.
You also need to run this command as root.This command has four sub commands; write, clear, cursor, backlight.
### write
Write mult lines.```sh
./i2cdisplay.py write "abc" "def"
```### clear
Clear display.```sh
./i2cdisplay.py clear
```### cursor
Turn on/off cursor.```sh
# Turn on
./i2cdisplay.py cursor True
# Turn off
./i2cdisplay.py cursor False
```### backlight
Change backlight's brightness.```sh
./i2cdisplay.py backlight 128 # Chose from 0-255
```License
--------
This software is released under the MIT License, see LICENSE.