https://github.com/youtecha320u/raspberrypi_python_so1602_lib
https://github.com/youtecha320u/raspberrypi_python_so1602_lib
oled python2 python3 raspberrypi so1602
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/youtecha320u/raspberrypi_python_so1602_lib
- Owner: YoutechA320U
- Created: 2018-12-21T02:13:54.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-21T04:43:04.000Z (over 7 years ago)
- Last Synced: 2026-03-29T21:43:49.211Z (3 months ago)
- Topics: oled, python2, python3, raspberrypi, so1602
- Language: Python
- Size: 118 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RaspberryPi_Python_so1602_lib
## 概要
このライブラリは、RaspberryPiで[SO1602 有機ELキャラクタディスプレイモジュール16x2行](http://akizukidenshi.com/catalog/g/gP-08277/)を扱いやすくするためのライブラリです。直接日本語(カタカナ)や一部特殊文字が使えます。
## 必要なライブラリ
smbus
## コマンド一覧
so1602.setaddr( SlaveAddress )
モジュールのスレーブアドレスを設定します。最初に必ず使用してください。
so1602.command( Command )
各種コマンドを実行します。実行できるコマンドは[データシート](http://akizukidenshi.com/download/ds/sunlike/SO1602AWYB-UC-WB-U.pdf)を参照してください。
so1602.write( "character" )
so1602.write( 'character' )
ディスプレイに文字列を表示します。文字列は必ずクォーテーションマークかアポストロフィーで囲んでください。表示できる文字は[so1602.py](https://github.com/YoutechA320U/RaspberryPi_Python_so1602_library/blob/master/so1602.py)を参照してください。
## 使用例
import so1602 #モジュールをインポート
so1602.setaddr(0x3c) #スレーブアドレスを0x3Cに設定
so1602.command(0x0c) #so1602をオン
so1602.command(0x01) #so1602をリセット
so1602.command(0x80) #カーソルを1行目の先頭に
so1602.write("SO1602ナンダヨ!")
so1602.command(0xa0) #カーソルを2行目の先頭に
so1602.write("ΩΩΩ<ナ、ナンダッテー!?")

### 参考資料
*
*
## 履歴
[2018/12/21] - 初回リリース