{"id":27134909,"url":"https://github.com/elehobica/pico_tinygo_vs1053","last_synced_at":"2026-03-06T02:42:28.506Z","repository":{"id":57705232,"uuid":"489526670","full_name":"elehobica/pico_tinygo_vs1053","owner":"elehobica","description":"Raspberry Pi Pico TinyGo + VS1053","archived":false,"fork":false,"pushed_at":"2023-11-03T13:37:02.000Z","size":1518,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-19T19:41:03.121Z","etag":null,"topics":["raspberry-pi-pico","tinygo","vs1053"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elehobica.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-05-07T00:21:32.000Z","updated_at":"2023-10-07T05:06:38.000Z","dependencies_parsed_at":"2022-08-24T14:57:16.003Z","dependency_job_id":"f1701033-0ed2-47b2-824c-9d4576f33006","html_url":"https://github.com/elehobica/pico_tinygo_vs1053","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/elehobica%2Fpico_tinygo_vs1053","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elehobica%2Fpico_tinygo_vs1053/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elehobica%2Fpico_tinygo_vs1053/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elehobica%2Fpico_tinygo_vs1053/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elehobica","download_url":"https://codeload.github.com/elehobica/pico_tinygo_vs1053/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247755574,"owners_count":20990626,"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":["raspberry-pi-pico","tinygo","vs1053"],"created_at":"2025-04-08T00:59:50.113Z","updated_at":"2026-03-06T02:42:28.457Z","avatar_url":"https://github.com/elehobica.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raspberry Pi Pico TinyGo VS1053\n## Overview\nThis project is an example of VS1053 on Raspberry Pi Pico by TinyGo.\n* confirmed with TinyGo 0.27.0\n\nThis project features:\n* VS1053 MP3 playback\n* read MP3 bitstream by goroutine with Mutex for SPI, which allows to share single SPI for both VS1053 and SD card\n* Filesystem by FatFs R0.13c ([http://elm-chan.org/fsw/ff/](http://elm-chan.org/fsw/ff/))\n  (SD card supports SD, SDHC, SDXC cards and FAT16, FAT32, exFAT formats)\n* machine optimization by CGO to improve SPI access performance\n\n## Supported Board\n* Raspberry Pi Pico\n* VS1053 Board (confirmed with LC Technology board)\n\n## Circuit Diagram\n![Circuit Diagram](doc/Pico_VS1053_Schematic.png)\n\n## Pin Assignment\n### Serial (CP2102 module)\n| Pico Pin # | Pin Name | Function | CP2102 module |\n----|----|----|----\n|  1 | GP0 | UART0_TX | RXD |\n|  2 | GP1 | UART0_RX | TXD |\n|  3 | GND | GND | GND |\n\n### VS1053 board\n| Pico Pin # | Pin Name | Function | VS1053 board |\n----|----|----|----\n|  4 | GP2 | SPI0_SCK | SCK |\n|  5 | GP3 | SPI0_TX | MOSI |\n|  6 | GP4 | SPI0_RX | MISO |\n|  8 | GND | GND | DGND |\n|  9 | GP6 | GPIO Output | XCS |\n| 10 | GP7 | GPIO Output | XRST |\n| 21 | GP16 | GPIO Input | DREQ |\n| 22 | GP17 | GPIO Output | XDCS |\n| 40 | VBUS | 5V | 5V |\n\n### microSD card\n| Pico Pin # | Pin Name | Function | microSD connector | microSD SPI board |\n----|----|----|----|----\n|  4 | GP2 | SPI0_SCK | CLK (5) | CLK |\n|  5 | GP3 | SPI0_TX | CMD (3) | MOSI |\n|  6 | GP4 | SPI0_RX | DAT0 (7) | MISO |\n|  7 | GP5 | SPI0_CSn | CD/DAT3 (2) | CS |\n|  8 | GND | GND | VSS (6) | GND |\n| 36 | 3V3(OUT) | 3.3V | VDD (4) | 3V3 |\n\n#### Caution\n* SPI0_TX and SPI0_RX needs to be pull-ed up with 10Kohm.\n* Wire length between Pico and SD card is very sensitive. Short wiring as possible is desired, otherwise errors such as Mount error, Preallocation error and Write fail will occur.\n* SPI interface can be shared or serarated with VS1053\n\n## How to build\n* Build is confirmed only in TinyGo Docker environment with Windows WSL2 integration\n* Before starting docker, clone repository to your local enviroment (by GitBash etc.)\n```\n\u003e cd /d/somewhere/share\n\u003e git clone -b main https://github.com/elehobica/pico_tinygo_vs1053.git\n```\n\n* Docker\n```\n\u003e wsl\n(in WSL2 shell)\n$ docker pull tinygo/tinygo:0.27.0\n$ docker images\n$ docker run -it -v /mnt/d/somewhere/share:/share tinygo/tinygo:0.27.0 /bin/bash\n(in docker container)\n# cd /share\n\n(copy repository for docker native directory for best performance of WSL2, otherwise stay /share)\n(# cp -r /share/pico_tinygo_vs1053 ~/ \u0026\u0026 cd ~ )\n\n# cd pico_tinygo_vs1053\n```\n\n* Go Module Configuration\n```\n# go mod init github.com/elehobica/pico_tinygo_vs1053\n# go mod tidy\n```\n\n* TinyGo Build\n```\n# tinygo build -target=pico --serial uart -o pico_tinygo_vs1053.uf2\n\n(copy UF2 back to Windows local if working on docker native directory)\n(# cp pico_tinygo_vs1053.uf2 /share/pico_tinygo_vs1053/ )\n```\n\n* Put UF2 \n\nThen, go back to Windows environment and put \"pico_tinygo_vs1053.uf2\" on RPI-RP2 drive\n\n## Playback function\n* put \"track001.mp3\" and \"track002.mp3\" on root directory of SD card\n* no operability while playing \"track001.mp3\" because of blocking playback\n* while playing \"track002.mp3\", following commands through Serial are available\n\n| Key | Function |\n----|----\n| p | Pause / Play |\n| +, = | Volume Up |\n| - | Volume Down |\n\nIf SD card read error occurs (panic: runtime error, etc), try [pico_tinygo_fatfs_test](https://github.com/elehobica/pico_tinygo_fatfs_test) at first.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felehobica%2Fpico_tinygo_vs1053","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felehobica%2Fpico_tinygo_vs1053","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felehobica%2Fpico_tinygo_vs1053/lists"}