{"id":21028043,"url":"https://github.com/d2r2/go-max7219","last_synced_at":"2025-05-15T10:33:09.844Z","repository":{"id":57520474,"uuid":"38154396","full_name":"d2r2/go-max7219","owner":"d2r2","description":"Golang library to interact with LED driver MAX7219 via SPI-bus from Raspberry PI.","archived":false,"fork":false,"pushed_at":"2018-07-07T09:20:38.000Z","size":3348,"stargazers_count":14,"open_issues_count":2,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T08:03:02.883Z","etag":null,"topics":["embedded-linux","golang","gpio"],"latest_commit_sha":null,"homepage":"","language":"Go","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/d2r2.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":"2015-06-27T09:18:42.000Z","updated_at":"2023-09-22T11:10:54.000Z","dependencies_parsed_at":"2022-09-26T18:00:57.387Z","dependency_job_id":null,"html_url":"https://github.com/d2r2/go-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/d2r2%2Fgo-max7219","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-max7219/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-max7219/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d2r2%2Fgo-max7219/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d2r2","download_url":"https://codeload.github.com/d2r2/go-max7219/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254323242,"owners_count":22051745,"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":["embedded-linux","golang","gpio"],"created_at":"2024-11-19T11:53:44.302Z","updated_at":"2025-05-15T10:33:07.107Z","avatar_url":"https://github.com/d2r2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"MAX7219 driver and 8x8 LED matrix display\n=========================================\n\n[![Build Status](https://travis-ci.org/d2r2/go-max7219.svg?branch=master)](https://travis-ci.org/d2r2/go-max7219)\n[![Go Report Card](https://goreportcard.com/badge/github.com/d2r2/go-max7219)](https://goreportcard.com/report/github.com/d2r2/go-max7219)\n[![GoDoc](https://godoc.org/github.com/d2r2/go-max7219?status.svg)](https://godoc.org/github.com/d2r2/go-max7219)\n[![MIT License](http://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\u003c!--\n[![Coverage Status](https://coveralls.io/repos/d2r2/go-dht/badge.svg?branch=master)](https://coveralls.io/r/d2r2/go-dht?branch=master)\n--\u003e\n\nThis library written in [Go programming language](https://golang.org/) to output a text messages to 8x8 LED matrix display ([pdf reference](https://raw.github.com/d2r2/go-max7219/master/docs/LED8x8_1088AS.pdf)) via MAX7219 driver chip ([pdf reference](https://raw.github.com/d2r2/go-max7219/master/docs/MAX7219-MAX7221.pdf)) from Raspberry PI or counterparts:\n![image](https://raw.github.com/d2r2/go-max7219/master/docs/Matrix%20MAX7219.JPG)\n![image](https://raw.github.com/d2r2/go-max7219/master/docs/Matrix%20MAX7219%202.JPG)\n\nCompatibility\n-------------\n\nTested on Raspberry PI 1 (model B) and Banana PI (model M1).\n\nGolang usage\n------------\n\n```go\nfunc main() {\n\t// Create new LED matrix with number of cascaded devices is equal to 1\n\tmtx := max7219.NewMatrix(1)\n\t// Open SPI device with spibus and spidev parameters equal to 0 and 0.\n\t// Set LED matrix brightness is equal to 7\n\terr := mtx.Open(0, 0, 7)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer mtx.Close()\n\t// Output text message to LED matrix\n\tmtx.SlideMessage(\"Hello world!!! Hey Beavis, let's rock!\",\n\t\tmax7219.FontCP437, true, 50*time.Millisecond)\n\t// Wait 1 sec, then continue output new text\n\ttime.Sleep(1 * time.Second)\n\t// Output national text (russian in example) to LED matrix\n\tmtx.SlideMessage(\"Привет мир!!! Шарик, ты - балбес!!!\",\n\t\tmax7219.FontZXSpectrumRus, true, 50*time.Millisecond)\n}\n```\n\nGetting help\n------------\n\nGoDoc [documentation](http://godoc.org/github.com/d2r2/go-max7219)\n\nInstallation\n------------\n\n```bash\n$ go get -u github.com/d2r2/go-max7219\n```\n\nQuick Start\n-----------\n\nTo output a single letter to LED matrix by specifing ascii code use OutputAsciiCode call:\n```go\n\t// Output a sequence of ascii codes in a loop\n\tfont = max7219.FontCP437\n\tfor i := 0; i \u003c= len(font.GetLetterPatterns()); i++ {\n\t\tmtx.OutputAsciiCode(0, font, i, true)\n\t\ttime.Sleep(500 * time.Millisecond)\n\t}\n```\nTo output a single national letter either unicode letter (rune) to LED matrix use OutputChar call:\n```go\n\t// Output non-latin national letter (russian for example).\n\t// You must be sure, that your national letter will match code page of the font used.\n\tmtx.OutputChar(0, max7219.FontZXSpectrumRus, 'Я', true)\n```\n\nThis functionality works not only with Raspberry PI, but with counterparts as well (tested with Raspberry PI and Banana PI). It will works with any Raspberry PI clone, which support Kernel SPI bus, but you should in advance make SPI bus device available in /dev/ list.\n\nMore national fonts\n-------------------\n\nIf you want to add your national fonts you could use linux shell scripts in folder \"extract_fonts\" to convert font image to bit patterns. Let me know if you need assistance in this.\n\nCredits\n-------\n\nThis project is mainly a fork of respective functionality originally written by [Richard Hull](https://github.com/rm-hull) in python: \u003chttps://github.com/rm-hull/max7219\u003e. Nevertheless it differs in some parts: refuse some functionality (works only with matrix led), include extra functionality (extra fonts, support of national languages).\n\nContact\n-------\n\nPlease use [Github issue tracker](https://github.com/d2r2/go-max7219/issues) for filing bugs or feature requests.\n\nLicense\n-------\n\nGo-max7219 is licensed under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2r2%2Fgo-max7219","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd2r2%2Fgo-max7219","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd2r2%2Fgo-max7219/lists"}