Organic EL character display SO1602 Python library for operation implemented with AdaFruit specifications (for Raspberry Pi)

Overview

The SO1602 organic EL character display (16 characters x 2 columns) sold by Akizuki Denshi is convenient for character display, and the implementation for operating on Arduino and RaspberryPi is C language and Python as it is. Even so, when combined with a sensor that operates via I2C such as the BME280, it seems that the description is unified according to the CircuitPython method provided by Adafruit. So, I wrote the necessary library for SO1602 in CircuitPython style or Adafruit style and released it.

SO1602 product information

Akizuki Denshi's website, etc., describes the display module products and data sheets that use SO1602. ・ Http://akizukidenshi.com/catalog/goods/search.aspx?search=x&keyword=%97L%8B%40%82d%82k%83L%83%83%83%89%83N%83%5E%83f% 83B% 83X% 83v% 83% 8C% 83C% 83% 82% 83W% 83% 85% 81% 5B% 83% 8B% 81% 40% 82P% 82U% 81% 7E% 82Q% 8Ds & image =% 8C% 9F % 8D% F5

How to Use

Clone library

First, clone the SO1602 library (it looks like Adafruit, but it looks just like Adafruit and has nothing to do with Adafruit).

% git clone -b v0.1 https://github.com/gdaisukesuzuki/Adafruit_CircuitPython_SO1602
% cd Adafruit_CircuitPython_SO1602

Installation

% python3 setup.py build
% python3 setup.py install

It's my personal hobby, but I build and implement it like this.

% python3 setup.py bdist_wheel
% sudo pip3 install dist/adafruit_circuitpython_so1602-0.1-py3-none-any.whl -U -V 

Operation check

The operation check of python3 looks like this. Katakana can also be displayed.

import time

import board
import busio

import adafruit_so1602

# Create library object using our Bus I2C port
i2c = busio.I2C(board.SCL, board.SDA)
SO1602 = adafruit_so1602.Adafruit_SO1602_I2C(i2c)

SO1602.writeLine(str="SO1602 Nandayo!",line=0,align="left")
SO1602.writeLine(str="ΩΩΩ<Na, Nandatte!?",line=1,align="left")

It ’s easy, but I ’ll introduce the method.

The operation including initialization is like CircuitPython.

SO1602 = adafruit_so1602.Adafruit_SO1602_I2C(i2c)

At the time of initialization, it is also possible to set the slave address separately as shown below, and set the cursor display and the presence / absence of blinking.

SO1602 = adafruit_so1602.Adafruit_SO1602_I2C(i2c=i2c, address=0x3c, cursor = True, blink = False)

When displaying a character string, set the display line (0 or 1) with "line" and left-right alignment with "align".

SO1602.writeLine(str="SO1602 Nandayo!",line=0,align="right")

Other methods are as follows

SO1602.displayOn(cursor = True/False, blink = True/False) #Display On
SO1602.displayOff()                                       #Display Off
SO1602.displayClear()                                     #Erase all display
SO1602.returnHome()                                       #Move the cursor home

Be careful

・ In addition to SO1602, Akizuki Denshi sells various LCD and other character displays that should be called the "XX1602 series" (SC1602, AQM1602, ACM1602, etc.). I have not verified the operation, but if it is an I2C connection, it may work if you change the slave address setting. -Since SO1602 is an organic EL, the power consumption is quite large (50mA). Is it because of that? If you connect it in series with another I2C connection sensor, the operation becomes unstable. Therefore, when using it in such a way, "PCA9306", "PCA9515AD", etc. should be sandwiched in the form of a repeater of the I2C bus.

Referenced site

・ Htps: // Gityu b. This m / yotecha 320 u / ra sp belly _Py _ so 1602 _ i b @ YoutechA320U (I don't think qiita has an account ...)'s GitHub. I referred a lot (the basic part is almost plagiarism here) ・ Https://qiita.com/uhey22e/items/14d3e1d95d6ddc90fb2c Commentary by @ uhey22e. This was also very helpful. Most of the commands for SO1602 operation are covered. ・ Htps: // ww. Denshi. cub / pc / raspi / rasp belly-pi lcd. html Electronic work promotion project's blog (For reference of register operation. You can look at the data sheet, but to quickly pick up and eat the necessary parts) ・ Htp: // Akizuki Denshi. Small m / square g / g / gP-08277 / Product introduction of the organic EL module that I used for operation verification (Akizuki Denshi)

GitHub ・ Https://github.com/gdaisukesuzuki/Adafruit_CircuitPython_SO1602

Recommended Posts

Organic EL character display SO1602 Python library for operation implemented with AdaFruit specifications (for Raspberry Pi)
Display USB camera video with Python OpenCV with Raspberry Pi
Update Python for Raspberry Pi to 3.7 or later with pyenv
Use vl53l0x with Raspberry Pi (python)
Adafruit Python BluefruitLE works on Raspberry Pi.
Try fishing for smelt with Raspberry Pi
Working with GPS on Raspberry Pi 3 Python
Moved Raspberry Pi remotely so that it can be LED attached with Python
Discord bot with python raspberry pi zero with [Notes]
Media programming with Raspberry Pi (preparation for audio)
I tried L-Chika with Raspberry Pi 4 (Python edition)
Get CPU information of Raspberry Pi with Python
Connect to MySQL with Python on Raspberry Pi
GPS tracking with Raspberry Pi 4B + BU-353S4 (Python)
Measure CPU temperature of Raspberry Pi with Python
Install PyCall on Raspberry PI and try using GPIO's library for Python from Ruby