{"id":15606417,"url":"https://github.com/zeiv/ssd1306-ruby","last_synced_at":"2025-04-27T12:52:52.908Z","repository":{"id":59156233,"uuid":"56259635","full_name":"zeiv/SSD1306-ruby","owner":"zeiv","description":"Ruby library for the SSD1306 OLED display.","archived":false,"fork":false,"pushed_at":"2024-01-24T21:20:02.000Z","size":33,"stargazers_count":10,"open_issues_count":3,"forks_count":10,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-27T12:52:31.849Z","etag":null,"topics":["oled-display","raspberry-pi","ruby-library","ssd1306"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/zeiv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-14T18:10:13.000Z","updated_at":"2024-01-24T21:20:06.000Z","dependencies_parsed_at":"2024-10-03T04:40:20.072Z","dependency_job_id":null,"html_url":"https://github.com/zeiv/SSD1306-ruby","commit_stats":{"total_commits":37,"total_committers":4,"mean_commits":9.25,"dds":"0.43243243243243246","last_synced_commit":"ab175f7514b4906db2909f903c8e3234e933e522"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeiv%2FSSD1306-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeiv%2FSSD1306-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeiv%2FSSD1306-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeiv%2FSSD1306-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeiv","download_url":"https://codeload.github.com/zeiv/SSD1306-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251141827,"owners_count":21542429,"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":["oled-display","raspberry-pi","ruby-library","ssd1306"],"created_at":"2024-10-03T04:40:17.805Z","updated_at":"2025-04-27T12:52:52.891Z","avatar_url":"https://github.com/zeiv.png","language":"Ruby","readme":"# SSD1306\n\n[![Gem Version](https://badge.fury.io/rb/SSD1306.svg)](https://badge.fury.io/rb/SSD1306) [![Build Status](https://travis-ci.org/zeiv/SSD1306-ruby.svg?branch=master)](https://travis-ci.org/zeiv/SSD1306-ruby) [![Code Climate](https://codeclimate.com/github/zeiv/SSD1306-ruby/badges/gpa.svg)](https://codeclimate.com/github/zeiv/SSD1306-ruby) [![Test Coverage](https://codeclimate.com/github/zeiv/SSD1306-ruby/badges/coverage.svg)](https://codeclimate.com/github/zeiv/SSD1306-ruby/coverage) [![Inline docs](http://inch-ci.org/github/zeiv/SSD1306-ruby.svg?branch=master)](http://inch-ci.org/github/zeiv/SSD1306-ruby)\n\nThis is a library for the SSD1306 OLED Display written in Ruby.  It was inspired by Adafruit's libraries written in Python and C.  Much of the original logic was simply ported from their Python library, but in addition this Ruby library provides additional functionality such as `print` and `println` helpers.  The library also features simple image parsing.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'SSD1306'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install SSD1306\n\n## Usage\n\nUsing the library is simple.  To start with, require the library and initialize the display:\n\n```ruby\nrequire 'SSD1306'\ndisp = SSD1306::Display.new\n```\n\nThe default options are suitable for the Raspberry Pi and a 128x64 display.  These can be overridden by specifying values like so:\n\n```ruby\ndisp = SSD1306::Display.new(protocol: :i2c, path: '/dev/i2c-1', address: 0x3C, width: 128, height: 64)\n```\n\nWriting text on the display is simple:\n\n```ruby\ndisp.println \"This is my IP Address:\"\ndisp.println \"\" # The same as disp.print \"\\n\"\ndisp.font_size = 2\ndisp.println ip_address\ndisp.display!\n```\n\nYou can also display monochrome images:\n\n```ruby\ninclude Magick  # RMagick is a dependency\nimage = Image.read(\"path/to/my/image.png\").first # Image.read returns an array\n\ndisp.image(image) # Pass in an RMagick image object\ndisp.display!\n```\n\nThe display can also be easily cleared:\n\n```ruby\ndisp.clear\ndisp.display!\n\n# Or more simply:\ndisp.clear!\n```\n\nCheck out the source code for additional information.\n\n## To-do\n\n* Currently only 1, 2, and 4 work as font sizes. In the meantime, to use other fonts or font sizes, I recommend using RMagick's `annotate` feature and passing in an image.\n* Implement SPI.  Only I2C is currently supported. (For v1.0)\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests. Run `bundle exec SSD1306` to use the gem in this directory, ignoring other installed copies of this gem.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/zeiv/SSD1306-ruby.\n\n## Acknowledgements\n\nThis library is inspired by the Adafruit SSD1306 Python library, available here: https://github.com/adafruit/Adafruit_Python_SSD1306\n\n## License\n\nCopyright (c) 2016 Xavier Bick under the MIT License.  See the LICENSE file for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeiv%2Fssd1306-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeiv%2Fssd1306-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeiv%2Fssd1306-ruby/lists"}