{"id":26871134,"url":"https://github.com/codeadamca/spike-speaker","last_synced_at":"2025-03-31T07:18:34.415Z","repository":{"id":115328692,"uuid":"512513444","full_name":"codeadamca/spike-speaker","owner":"codeadamca","description":"A basic example of using MicroPython and the speaker on the LEGO Spike hub.","archived":false,"fork":false,"pushed_at":"2025-01-26T22:26:23.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T23:21:28.082Z","etag":null,"topics":["lego","mindstorms","python","spike"],"latest_commit_sha":null,"homepage":"","language":null,"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/codeadamca.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-10T18:47:16.000Z","updated_at":"2025-01-26T22:26:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"1bec7943-4e83-4731-a281-1a8e7d5977cd","html_url":"https://github.com/codeadamca/spike-speaker","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/codeadamca%2Fspike-speaker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fspike-speaker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fspike-speaker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fspike-speaker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeadamca","download_url":"https://codeload.github.com/codeadamca/spike-speaker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246429487,"owners_count":20775809,"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":["lego","mindstorms","python","spike"],"created_at":"2025-03-31T07:18:33.315Z","updated_at":"2025-03-31T07:18:34.404Z","avatar_url":"https://github.com/codeadamca.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# LEGO® Spike Hub and the Speaker\n\nA Python snippet utilizing the LEGO Spike speaker, [MicroPython](https://lego.github.io/MINDSTORMS-Robot-Inventor-hub-API/), and the `beep()`, `start_beep()`, `stop()`, `play_sound()`, and `set_volume()` commands.\n\n## Sample Code\n\n```py\nfrom mindstorms import MSHub\nfrom mindstorms.control import wait_for_seconds\n\nhub = MSHub()\n\nhub.speaker.beep()\nhub.speaker.beep(44, 2, 50)\nhub.speaker.beep(123, 4, 100)\n\nhub.speaker.start_beep(60, 100)\nwait_for_seconds(2)\nhub.speaker.stop()\n\nhub.speaker.play_sound('Celebrate', 50)\n\nhub.speaker.start_sound('Shut Down')\nwait_for_seconds(2)\n\nhub.speaker.beep()\n```\n\n***\n\n## Repo Resources\n\n* [Visual Studio Code](https://code.visualstudio.com/)\n* [MicroPython for LEGO Robot Inventor](https://www.lego.com/en-ca/themes/mindstorms/downloads)\n* [LEGO Mindstorms](https://www.lego.com/en-ca/themes/mindstorms)\n* [LEGO Mindstorms App for Mac](https://apps.apple.com/us/app/lego-mindstorms-inventor/id1515448947)\n* [LEGO Mindstorms App for Android](https://play.google.com/store/apps/details?id=com.lego.retail.mindstorms)\n* [LEGO Mindstorms App for Windows](https://www.microsoft.com/store/apps/9N7GN3KC2GK6)\n\n\u003cbr\u003e\n\u003ca href=\"https://codeadam.ca\"\u003e\n\u003cimg src=\"https://cdn.codeadam.ca/images@1.0.0/codeadam-logo-coloured-horizontal.png\" width=\"200\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fspike-speaker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeadamca%2Fspike-speaker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fspike-speaker/lists"}