Skip to main content

ssd1362 for python

Project description

ssd1362

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

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)
  • Ssd1362.show(gray_level)

    • parameters
      • gray_level
        • ssd1362's pixel gray scale
        • min:0 ~ max:15

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.0.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

ssd1362_py-0.1.0-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page