{"id":13613260,"url":"https://github.com/mcauser/micropython-max7219","last_synced_at":"2025-05-02T22:31:03.631Z","repository":{"id":37580072,"uuid":"105442967","full_name":"mcauser/micropython-max7219","owner":"mcauser","description":"MicroPython driver for MAX7219 8x8 LED matrix modules, cascadable and with framebuf","archived":false,"fork":false,"pushed_at":"2019-07-03T01:02:28.000Z","size":5,"stargazers_count":194,"open_issues_count":5,"forks_count":58,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-07T07:42:52.006Z","etag":null,"topics":["framebuf","led-matrix","max7219","micropython","spi"],"latest_commit_sha":null,"homepage":"","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/mcauser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-10-01T13:10:56.000Z","updated_at":"2025-03-20T11:45:10.000Z","dependencies_parsed_at":"2022-08-29T10:20:10.372Z","dependency_job_id":null,"html_url":"https://github.com/mcauser/micropython-max7219","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/mcauser%2Fmicropython-max7219","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-max7219/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-max7219/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-max7219/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcauser","download_url":"https://codeload.github.com/mcauser/micropython-max7219/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252116097,"owners_count":21697308,"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":["framebuf","led-matrix","max7219","micropython","spi"],"created_at":"2024-08-01T20:00:42.868Z","updated_at":"2025-05-02T22:31:00.048Z","avatar_url":"https://github.com/mcauser.png","language":"Python","readme":"# MicroPython MAX7219 8x8 LED Matrix\n\nA MicroPython library for the MAX7219 8x8 LED matrix driver, SPI interface, supports cascading and uses [framebuf](http://docs.micropython.org/en/latest/pyboard/library/framebuf.html)\n\n## PyBoard Examples\n\n**Single 8x8 LED Matrix**\n\n```python\nimport max7219\nfrom machine import Pin, SPI\nspi = SPI(1)\ndisplay = max7219.Matrix8x8(spi, Pin('X5'), 1)\ndisplay.text('1',0,0,1)\ndisplay.show()\n```\n\n**Chain of 4x 8x8 LED Matrices**\nWhere the 4 is drawn on the DIN matrix.\n\n```python\nimport max7219\nfrom machine import Pin, SPI\nspi = SPI(1)\ndisplay = max7219.Matrix8x8(spi, Pin('X5'), 4)\ndisplay.text('1234',0,0,1)\ndisplay.show()\n```\n\n**Chain of 8x 8x8 LED Matrices**\nWhere the 8 is drawn on the DIN matrix\n\n```python\nimport max7219\nfrom machine import Pin, SPI\nspi = SPI(1)\ndisplay = max7219.Matrix8x8(spi, Pin('X5'), 8)\ndisplay.text('12345678',0,0,1)\ndisplay.show()\n```\n\n**Framebuf shapes and text**\n\n```python\ndisplay.fill(0)\ndisplay.show()\n\ndisplay.pixel(0,0,1)\ndisplay.pixel(1,1,1)\ndisplay.hline(0,4,8,1)\ndisplay.vline(4,0,8,1)\ndisplay.line(8, 0, 16, 8, 1)\ndisplay.rect(17,1,6,6,1)\ndisplay.fill_rect(25,1,6,6,1)\ndisplay.show()\n\ndisplay.fill(0)\ndisplay.text('dead',0,0,1)\ndisplay.text('beef',32,0,1)\ndisplay.show()\n\ndisplay.fill(0)\ndisplay.text('12345678',0,0,1)\ndisplay.show()\ndisplay.scroll(-8,0) # 23456788\ndisplay.scroll(-8,0) # 34567888\ndisplay.show()\n```\n\n## ESP8266 Examples\n\nDefault baud rate of 80Mhz was introducing errors, dropped from 10Mhz and it works consistently.\n\n```python\nimport max7219\nfrom machine import Pin, SPI\nspi = SPI(1, baudrate=10000000, polarity=0, phase=0)\ndisplay = max7219.Matrix8x8(spi, Pin(15), 4)\ndisplay.brightness(0)\ndisplay.fill(0)\ndisplay.text('1234',0,0,1)\ndisplay.show()\n```\n\n## ESP32 Examples\n\nDefault baud rate of 80Mhz was introducing errors, dropped from 10Mhz and it works consistently.\n\n```python\nimport max7219\nfrom machine import Pin, SPI\nspi = SPI(1, baudrate=10000000, polarity=1, phase=0, sck=Pin(4), mosi=Pin(2))\nss = Pin(5, Pin.OUT)\ndisplay = max7219.Matrix8x8(spi, ss, 4)\ndisplay.text('1234',0,0,1)\ndisplay.show()\n```\n\n## Connections\n\nPyBoard | max7219 8x8 LED Matrix\n------- | ----------------------\nVIN     | VCC\nGND     | GND\nX8 MOSI | DIN\nX5 CS   | CS\nX6 SCK  | CLK\n\nWemos D1 Mini    | max7219 8x8 LED Matrix\n---------------- | ----------------------\n5V               | VCC\nGND              | GND\nD7 MOSI (GPIO13) | DIN\nD8 CS (GPIO15)   | CS\nD5 SCK (GPIO14)  | CLK\n\nESP32            | max7219 8x8 LED Matrix\n---------------- | ----------------------\n5V               | VCC \nGND              | GND\nD2 MOSI          | DIN\nD5 CS            | CS\nD4 SCK           | CLK\n\n## Links\n\n* Based on [deshipu's max7219.py](https://bitbucket.org/thesheep/micropython-max7219/src)\n* [micropython.org](http://micropython.org)\n* [Docs on framebuf](http://docs.micropython.org/en/latest/pyboard/library/framebuf.html)\n\n## License\n\nLicensed under the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Display","显示类"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-max7219","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcauser%2Fmicropython-max7219","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-max7219/lists"}