ssd1362 for python
Project description
ssd1362
- oled(ssd1363) controller (tested with jetson nano)
- This module use linux's spidev, g4l(gpio), numpy
- link : https://gitlab.com/telelian/peripheral-library/ssd1362.git
Usage
class
- Ssd1362(spibus, spidev, io_dc)
- parameters
- spibus, spidev
- spi device info
- looks like /dev/spidev{spibus}.{device}
- io_dc
- data/command select pin number for ssd1362
- check your schematics
- spibus, spidev
- parameters
methods
-
Ssd1362.loadframe(buf)
- parameters
- buf
- load buffer for oled's pixel
- width : 256, height : 64
- list[height][width]
- pixel's gray level : 0 ~ 255 (convert to 16 level in show)
- buf
- parameters
-
Ssd1362.show(gray_level)
- parameters
- gray_level
- ssd1362's pixel gray scale
- min:0 ~ max:15
- gray_level
- parameters
example
from ssd1362 import Ssd1362
oled = Ssd1362(spibus=0, spidev=0, io_dc=38)
width = 256
height = 64
frame = np.zeros((height,width), dtype=int)
for i in range(width):
for j in range(height):
frame[j][i] = i&0xff
oled.loadframe(frame)
oled.show(15)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ssd1362-py-0.1.3.tar.gz
(3.4 kB
view hashes)
Built Distribution
Close
Hashes for ssd1362_py-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e271a5f2298094b44b384943b02ddf75e366af87cd541bc0c3e57bb95406af0 |
|
MD5 | f8aeb0616de870ad967aa5bf8f7ab8b9 |
|
BLAKE2b-256 | c37a1d89d9aed41f64559bfc857c7a38025900871d7c8f33d51aea62464cc0d6 |