{"id":13613256,"url":"https://github.com/JanBednarik/micropython-matrix8x8","last_synced_at":"2025-04-13T15:32:56.037Z","repository":{"id":23072832,"uuid":"26426459","full_name":"JanBednarik/micropython-matrix8x8","owner":"JanBednarik","description":"MicroPython driver for AdaFruit 8x8 LED Matrix display.","archived":false,"fork":false,"pushed_at":"2024-03-09T09:24:41.000Z","size":424,"stargazers_count":14,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-22T12:34:17.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/JanBednarik.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":"2014-11-10T07:51:49.000Z","updated_at":"2024-08-01T20:44:32.847Z","dependencies_parsed_at":"2024-08-01T20:44:32.259Z","dependency_job_id":"9cbfda6f-d808-4262-9159-310112f29d47","html_url":"https://github.com/JanBednarik/micropython-matrix8x8","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanBednarik%2Fmicropython-matrix8x8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanBednarik%2Fmicropython-matrix8x8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanBednarik%2Fmicropython-matrix8x8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanBednarik%2Fmicropython-matrix8x8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JanBednarik","download_url":"https://codeload.github.com/JanBednarik/micropython-matrix8x8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248736059,"owners_count":21153529,"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":[],"created_at":"2024-08-01T20:00:42.771Z","updated_at":"2025-04-13T15:32:55.727Z","avatar_url":"https://github.com/JanBednarik.png","language":"Python","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Display","显示类"],"readme":"MicroPython Matrix8x8 Driver\n============================\n\nMicroPython driver for AdaFruit 8x8 LED Matrix display with HT16K33 backpack.\n\nInstallation\n------------\n\nCopy `matrix8x8.py` file to your pyboard.\n\nUsage\n-----\n\n```\nfrom matrix8x8 import Matrix8x8\ndisplay = Matrix8x8()\ndisplay.set_row(2, 0xFF)      # turn on all LEDs in row 2\ndisplay.set_column(3, 0xFF)   # turn on all LEDs in column 3\ndisplay.set_pixel(7, 6)             # turn on LED at row 7, column 6\n...\n```\n\n**Device controll methods:**\n\n```\n__init__(i2c_bus=1, addr=0x70, brightness=15, i2c=None)\n    Params:\n    * i2c_bus = I2C bus ID (1 or 2) or None (if param 'i2c' is provided)\n    * addr = I2C address of connected display\n    * brightness = display brightness (0 - 15)\n    * i2c = initialised instance of pyb.I2C object\n\non()\n    Turn on display.\n\noff()\n    Turn off display. You can controll display when it's off (change image,\n    brightness, blinking, ...).\n\nset_brightness(value)\n    Set display brightness. Value from 0 (min) to 15 (max).\n\nset_blinking(mode)\n    Set blinking. Modes:\n        0 - blinking off\n        1 - blinking at 2Hz\n        2 - blinking at 1Hz\n        3 - blinking at 0.5Hz\n```\n\n**Image maipulation methods:**\n\n```\nset(bitmap)\n    Show bitmap on display. Bitmap should be 8 bytes/bytearray object or any\n    iterable object containing 8 bytes (one byte per row).\n\nset_row(row, byte)\n    Set row by byte.\n\nset_column(column, byte)\n    Set column by byte.\n\nset_pixel(row, column)\n    Set (turn on) pixel.\n\nclear()\n    Clear display.\n\nclear_row(row)\n    Clear row.\n\nclear_column(column)\n    Clear column.\n\nclear_pixel(row, column)\n    Clear pixel.\n```\n\nNotes:\n* Rows a columns are numbered from 0 to 7.\n\nExamples\n--------\n\n`examples/test_features.py` - Simple demo of display/driver fetures and usage.\n`examples/game_of_life.py` - Conway's Game of Life. In action video:\nhttp://youtu.be/XZgU1wqZMic\n\nYou can copy one of the examples to your pyboard as `main.py` and if you connect\ndisplay to I2C bus 1, they will instantly work.\n\nWiring\n------\n\nLED Matrix display is using I2C bus. You can connect and controll more displays\nwith one I2C bus if you change I2C address of display.\n\nExample of wiring to I2C bus 1 on breadboard:\n\n![](https://github.com/JanBednarik/micropython-matrix8x8/blob/master/docs/pyboard-matrix-wiring.jpg)\n\nMore info \u0026 Help\n----------------\n\nYou can check more about the MicroPython project here: http://micropython.org\n\nDiscussion about this driver: http://forum.micropython.org/viewtopic.php?f=5\u0026t=405\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJanBednarik%2Fmicropython-matrix8x8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FJanBednarik%2Fmicropython-matrix8x8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FJanBednarik%2Fmicropython-matrix8x8/lists"}