{"id":20621961,"url":"https://github.com/jennasys/micropython-max7219","last_synced_at":"2025-04-15T12:14:50.326Z","repository":{"id":44402126,"uuid":"187742183","full_name":"JennaSys/micropython-max7219","owner":"JennaSys","description":"MicroPython driver for MAX7219 7-segment modules","archived":false,"fork":false,"pushed_at":"2023-05-11T12:55:08.000Z","size":14,"stargazers_count":18,"open_issues_count":2,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T12:14:44.960Z","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/JennaSys.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-05-21T01:51:50.000Z","updated_at":"2024-06-29T15:50:52.000Z","dependencies_parsed_at":"2022-07-15T06:47:03.869Z","dependency_job_id":null,"html_url":"https://github.com/JennaSys/micropython-max7219","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JennaSys%2Fmicropython-max7219","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JennaSys%2Fmicropython-max7219/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JennaSys%2Fmicropython-max7219/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JennaSys%2Fmicropython-max7219/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JennaSys","download_url":"https://codeload.github.com/JennaSys/micropython-max7219/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067779,"owners_count":21207396,"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-11-16T12:19:56.135Z","updated_at":"2025-04-15T12:14:50.308Z","avatar_url":"https://github.com/JennaSys.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# micropython-max7219\n**MicroPython driver for MAX7219 with 7-segment modules**\n\n* Utilizes user specified SPI bus and CS line.\n* Supports cascading MAX7219 devices\n* Number of digits per MAX7219 device can be specified\n\n_max7219.py_ uses an internal buffer (array) that is a direct representation of the display when flushed.  So buffer[0] is the leftmost digit in the display and buffer[digits] is the rightmost.  Also, digit0 is the leftmost and digit7 is rightmost for each MAX7219 device.  Cascaded devices add additional digits to the right.  \n\nIf you have a pre-wired 7-segment display module that has the rightmost digit as digit0, then set the `reverse` parameter to `True` when you initialize the driver so that the digits will display in the correct order.\n\nIf less than 8 digits are connected to the MAX7219, set the `scan_digits` parameter when initializing so that the code propery handles text value inputs and cascading.  The digits initialization value represents the total number of digits across all cascaded devices.\n\n_seven_segment_ascii.py_ maps ascii characters to their segment representations.  `get_char()` uses a DP-G-F-E-D-C-B-A bit order and `get_char2()` uses a DP-A-B-C-D-E-F-G bit order (which is what the MAX7219 specifies).\n\n## ESP8266 Examples\n\n```python\nimport max7219\ndisplay = max7219.SevenSegment(digits=16, scan_digits=8, cs=5, spi_bus=2, reverse=True)\ndisplay.text(\"ABCDEF\")\ndisplay.number(3.14159)\ndisplay.message(\"Hello World\")\ndisplay.clear()\n```\n\n## Connections\n\n| ESP8266  | MAX7219 LED Driver |\n|----------|--------------------|\n| 5V       | VCC                |\n| GND      | GND                |\n| D7 MOSI  | DIN                |\n| D3 GPIO0 | CS                 |\n|  D5 SCK  | CLK                |\n\n*NOTE: A level shifter (i.e. 2N7000) may be required on the data lines going to the MAX7219 to change the 3.3V logic to 5V*\n\n\n## Credits\nThis library is based on:\n* [rm-hull's max7219.py (pre-2017 version)](https://github.com/rm-hull/max7219) for the Raspberry Pi ([PyPI Project](https://pypi.org/project/max7219/))\n* [dmadison's Segmented LED Display - ASCII Library](https://github.com/dmadison/LED-Segment-ASCII)\n\n\n## License\n\nLicensed under the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjennasys%2Fmicropython-max7219","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjennasys%2Fmicropython-max7219","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjennasys%2Fmicropython-max7219/lists"}