{"id":19721375,"url":"https://github.com/meinside/scrollphat-go","last_synced_at":"2026-05-26T16:05:34.623Z","repository":{"id":146700343,"uuid":"49138423","full_name":"meinside/scrollphat-go","owner":"meinside","description":"Go library for Pimoroni Scroll pHat","archived":false,"fork":false,"pushed_at":"2016-02-19T09:15:45.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T00:17:16.333Z","etag":null,"topics":["golang","pimoroni","scroll-phat"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meinside.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-06T13:59:39.000Z","updated_at":"2021-09-18T22:03:23.000Z","dependencies_parsed_at":"2023-05-04T19:00:29.364Z","dependency_job_id":null,"html_url":"https://github.com/meinside/scrollphat-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/meinside/scrollphat-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinside%2Fscrollphat-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinside%2Fscrollphat-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinside%2Fscrollphat-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinside%2Fscrollphat-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meinside","download_url":"https://codeload.github.com/meinside/scrollphat-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meinside%2Fscrollphat-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33528117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","pimoroni","scroll-phat"],"created_at":"2024-11-11T23:14:07.288Z","updated_at":"2026-05-26T16:05:34.588Z","avatar_url":"https://github.com/meinside.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go library for Pimoroni Scroll pHat\n\nGo library for controlling [Pimoroni](https://shop.pimoroni.com/)'s [Scroll pHat](https://shop.pimoroni.com/products/scroll-phat).\n\nMost of the codes were inspired by [scroll-phat](https://github.com/pimoroni/scroll-phat) and [Dave Cheney](http://dave.cheney.net/)'s [i2c](https://github.com/davecheney/i2c/blob/master/i2c.go).\n\n## Install\n\n```bash\n$ go get -u github.com/meinside/scrollphat-go\n```\n\n## Configuration\n\nYou need to enable I2C first:\n\n```bash\n$ sudo raspi-config\n```\n\nAlso, your account should be in 'i2c' group:\n\n```bash\n$ sudo usermod -G i2c USERNAME\n```\n\n## Sample\n\n```go\n// sample.go - sample application for Scroll pHat, 2016.01.07.\npackage main\n\nimport (\n\t\"time\"\n\n\tscroll \"github.com/meinside/scrollphat-go\"\n)\n\nfunc main() {\n\t//scroll.TrimRedundantSpaces = false\t// don't trim redundant spaces\n\n\tif phat := scroll.New(); phat != nil {\n\t\t// set brightneess\n\t\tphat.SetBrightness(5)\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// turn on all LEDs\n\t\tphat.Fill()\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// turn off all LEDs\n\t\tphat.Clear()\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// draw a string (not scrolling)\n\t\tphat.DrawBytes(scroll.BytesForString(\":-)\"))\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// draw a string (scrolling)\n\t\tphat.Scroll(\" 0123456789 ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz `~!@#$%^\u0026*()-=_+[]{};:\\\"'\u003c\u003e,.?/\\\\|\", 50)\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// draw points (heart-shaped...)\n\t\tphat.DrawBytes(scroll.ArraysToBytes([][]uint8{\n\t\t\t{0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0},\n\t\t\t{0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0},\n\t\t\t{0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0},\n\t\t\t{0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0},\n\t\t\t{0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0},\n\t\t}))\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// invert LEDs\n\t\tphat.Invert()\n\t\ttime.Sleep(1 * time.Second)\n\n\t\t// turn off all LEDs\n\t\tphat.Clear()\n\n\t\tphat.Close()\n\t} else {\n\t\tpanic(\"could not initialize ScrollPHat\")\n\t}\n}\n```\n\nCompile it and run like this:\n\n```bash\n$ go build sample.go\n$ ./sample\n```\n\nThen you'll see:\n\n![scroll_phat_sample.gif](https://cloud.githubusercontent.com/assets/185988/12164502/5031a09c-b559-11e5-9c34-c66c502183f6.gif)\n\n## License\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinside%2Fscrollphat-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeinside%2Fscrollphat-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeinside%2Fscrollphat-go/lists"}