{"id":15288043,"url":"https://github.com/mtrudel/ssd1322","last_synced_at":"2026-01-04T17:57:01.975Z","repository":{"id":57552196,"uuid":"207396370","full_name":"mtrudel/ssd1322","owner":"mtrudel","description":"Elixir library for controlling SSD1322 based OLED displays","archived":false,"fork":false,"pushed_at":"2020-07-17T00:46:01.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T10:17:39.164Z","etag":null,"topics":["elixir","nerves-project","oled-display","spi","ssd1322"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mtrudel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-09T20:15:27.000Z","updated_at":"2022-09-03T14:41:25.000Z","dependencies_parsed_at":"2022-09-26T18:50:34.216Z","dependency_job_id":null,"html_url":"https://github.com/mtrudel/ssd1322","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fssd1322","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fssd1322/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fssd1322/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtrudel%2Fssd1322/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtrudel","download_url":"https://codeload.github.com/mtrudel/ssd1322/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245206531,"owners_count":20577582,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","nerves-project","oled-display","spi","ssd1322"],"created_at":"2024-09-30T15:43:55.309Z","updated_at":"2026-01-04T17:57:01.908Z","avatar_url":"https://github.com/mtrudel.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SSD1322\n\n[![Build Status](https://travis-ci.org/mtrudel/ssd1322.svg?branch=master)](https://travis-ci.org/mtrudel/ssd1322)\n[![Hex.pm](https://img.shields.io/hexpm/v/ssd1322.svg?style=flat-square)](https://hex.pm/packages/ssd1322)\n\nThis package provides an interface for controlling OLED displays using the common \n[SSD1322](https://www.newhavendisplay.com/app_notes/SSD1322.pdf) chipset, as \navailable [here](https://www.aliexpress.com/item/32988174566.html) (or many other vendors).\nIn addition to supporting a number of bitmap formats for display, you can also control various\naspects of the display such as contrast values, enabling / disabling the display and other tasks.\n\n## Hardware\n\nThis library requires a 4 wire SPI connection to the display board, in addition to two GPIO lines. \nAll connections are made using the [Elixir Circuits](https://elixir-circuits.github.io) library.\n\nIf using this library via Nerves and wiring your hardware up in the manner described in the 'Putting it together' section of [this article](https://www.balena.io/blog/build-a-raspberry-pi-powered-train-station-oled-sign-for-your-desk/),\nthe default values will be sufficient. In other situations, you may need to explicitly set hardware\nparameters as detailed in the next section.\n\n## Usage\n\nCommon usage looks like so:\n\n```\n# Initialize your connection\n{:ok, pid} = SSD1322.start_link()\n\n# You can also override a bunch of options if needed:\n{:ok, pid} = SSD1322.start_link(spi_connection_opts: [spi_dev: \"spidev0.0\", dc_pin: 24, reset_pin: 25], width: 256, height: 64, name: \"my_display\")\n\n# Display the image defined by data. data is a binary containing row-wise \n# 4-bit greyscale pixel data in linear order. It follows that there data is\n# W x H / 2 bytes long. Check out github.com/mtrudel/ex_paint for a library that\n# can produce this format with little effort\nSSD1322.draw(pid, data)\n\n# You can also turn the display on and off\nSSD1322.display_on(pid)\nSSD1322.display_off(pid)\n\n# Set the contrast to a value between 0 and 255\nSSD1322.contrast(pid, contrast)\n\n# Clear the display to a given grey (black by default)\nSSD1322.clear(pid, grey \\\\ 0x00)\n\n# Or reset the connection if something goes wrong\nSSD1322.reset(pid)\n```\n\nNote that although this library serializes access for callers sharing a single connection instance, \nneither this library nor the underlying Elixir Circuits library provide any protection against multiple\nconcurrent access to an attached display by across multiple connection instances.\n\n## Installation\n\nThis package can be installed by adding `ssd1322` to your list of dependencies in `mix.exs`:\n\n```elixir\ndef deps do\n  [\n    {:ssd1322, \"~\u003e 0.1.0\"}\n  ]\nend\n```\n\nDocs can be found at [https://hexdocs.pm/ssd1322](https://hexdocs.pm/ssd1322).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtrudel%2Fssd1322","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtrudel%2Fssd1322","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtrudel%2Fssd1322/lists"}