{"id":19155582,"url":"https://github.com/raspberrypi-go-drivers/switchprocontroller","last_synced_at":"2026-04-30T12:32:52.440Z","repository":{"id":57558571,"uuid":"322625051","full_name":"raspberrypi-go-drivers/switchprocontroller","owner":"raspberrypi-go-drivers","description":"Allows to read inputs from a Nintendo Switch Pro controller connected using Bluetooth","archived":false,"fork":false,"pushed_at":"2020-12-18T16:15:15.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T14:48:43.639Z","etag":null,"topics":["driver","go","golang","raspberrypi","raspberrypi-drivers","robotics"],"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/raspberrypi-go-drivers.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":"2020-12-18T14:57:22.000Z","updated_at":"2023-07-26T01:08:20.000Z","dependencies_parsed_at":"2022-09-15T19:01:32.742Z","dependency_job_id":null,"html_url":"https://github.com/raspberrypi-go-drivers/switchprocontroller","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/raspberrypi-go-drivers/switchprocontroller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspberrypi-go-drivers%2Fswitchprocontroller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspberrypi-go-drivers%2Fswitchprocontroller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspberrypi-go-drivers%2Fswitchprocontroller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspberrypi-go-drivers%2Fswitchprocontroller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raspberrypi-go-drivers","download_url":"https://codeload.github.com/raspberrypi-go-drivers/switchprocontroller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raspberrypi-go-drivers%2Fswitchprocontroller/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32465009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["driver","go","golang","raspberrypi","raspberrypi-drivers","robotics"],"created_at":"2024-11-09T08:31:16.085Z","updated_at":"2026-04-30T12:32:52.417Z","avatar_url":"https://github.com/raspberrypi-go-drivers.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nintendo Switch Pro Controller\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/raspberrypi-go-drivers/switchprocontroller.svg)](https://pkg.go.dev/github.com/raspberrypi-go-drivers/switchprocontroller)\n![golangci-lint](https://github.com/raspberrypi-go-drivers/switchprocontroller/workflows/golangci-lint/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/raspberrypi-go-drivers/switchprocontroller)](https://goreportcard.com/report/github.com/raspberrypi-go-drivers/switchprocontroller)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nThis drivers allows to read inputs from a Nintendo Switch Pro Controller\nconnected using Bluetooth\n\n## Requirements\n\n- a Nintendo Switch Pro Controller connected to a Raspberry Pi using Bluetooth\n\n## Documentation\n\nFor full documentation, please visit [![Go Reference](https://pkg.go.dev/badge/github.com/raspberrypi-go-drivers/switchprocontroller.svg)](https://pkg.go.dev/github.com/raspberrypi-go-drivers/switchprocontroller)\n\n## Quick start\n\n```go\nimport (\n\t\"fmt\"\n\n\t\"github.com/raspberrypi-go-drivers/switchprocontroller\"\n)\n\nfunc main() {\n\tcontroller := switchprocontroller.NewSwitchProController()\n\tcontroller.StartListener(0)\n\tfor {\n\t\tselect {\n\t\tcase event := \u003c-controller.Events:\n\t\t\tif event.Button != nil {\n\t\t\t\tfmt.Printf(\"%s:%d\\n\", event.Button.Name, event.Button.State)\n\t\t\t} else if event.Stick != nil {\n\t\t\t\tfmt.Printf(\"%s - Y:%f X:%f\\n\", event.Stick.Name, event.Stick.Y, event.Stick.X)\n\t\t\t}\n\t\tcase \u003c-time.After(60 * time.Second):\n\t\t\tfmt.Println(\"timeout\")\n\t\t\treturn\n\t\t}\n\t}\n}\n```\n\n## Raspberry Pi compatibility\n\nThis driver has has only been tested on an Raspberry Pi Zero WH using integrated bluetooth but may work well on other Raspberry Pi having integrated Bluetooth\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspberrypi-go-drivers%2Fswitchprocontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraspberrypi-go-drivers%2Fswitchprocontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraspberrypi-go-drivers%2Fswitchprocontroller/lists"}