{"id":13457668,"url":"https://github.com/wokwi/rp2040js","last_synced_at":"2026-02-05T11:04:47.185Z","repository":{"id":38952417,"uuid":"333224195","full_name":"wokwi/rp2040js","owner":"wokwi","description":"A Raspberry Pi Pico Emulator in JavaScript","archived":false,"fork":false,"pushed_at":"2026-02-03T11:37:21.000Z","size":1111,"stargazers_count":486,"open_issues_count":20,"forks_count":58,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-02-04T01:14:02.562Z","etag":null,"topics":["emulator","javascript","raspberry-pi","raspberry-pi-pico","rp2040","simulation","simulator","typescript","wokwi"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/wokwi.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-26T21:38:25.000Z","updated_at":"2026-02-03T11:37:25.000Z","dependencies_parsed_at":"2023-11-28T21:55:26.815Z","dependency_job_id":"fa02f807-fd69-405c-9c43-98a32bc92f80","html_url":"https://github.com/wokwi/rp2040js","commit_stats":{"total_commits":295,"total_committers":14,"mean_commits":"21.071428571428573","dds":"0.12881355932203387","last_synced_commit":"6344182c491904aabe1051c87ec89615491e94b1"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"purl":"pkg:github/wokwi/rp2040js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Frp2040js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Frp2040js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Frp2040js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Frp2040js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wokwi","download_url":"https://codeload.github.com/wokwi/rp2040js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wokwi%2Frp2040js/sbom","scorecard":{"id":1240970,"data":{"date":"2026-01-05","repo":{"name":"github.com/wokwi/rp2040js","commit":"42033f51adc546b5b8d5aa7ccb212da4284ae503"},"scorecard":{"version":"v5.4.1-0.20251227023010-525a93017816","commit":"525a93017816fa74238c545bdecac6af16ce00f1"},"score":3.7,"checks":[{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":3,"reason":"dependency not pinned by hash detected -- score normalized to 3","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-micropython.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/wokwi/rp2040js/ci-micropython.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-micropython.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/wokwi/rp2040js/ci-micropython.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-pico-sdk.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/wokwi/rp2040js/ci-pico-sdk.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-pico-sdk.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/wokwi/rp2040js/ci-pico-sdk.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci-test.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/wokwi/rp2040js/ci-test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/ci-micropython.yml:28","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   3 out of   3 npmCommand dependencies pinned","Info:   0 out of   1 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 3/23 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#cii-best-practices"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci-micropython.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-pico-sdk.yml:1","Warn: no topLevel permission defined: .github/workflows/ci-test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/525a93017816fa74238c545bdecac6af16ce00f1/docs/checks.md#sast"}}]},"last_synced_at":"2026-01-11T04:42:06.529Z","repository_id":38952417,"created_at":"2026-01-11T04:42:06.529Z","updated_at":"2026-01-11T04:42:06.529Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29120483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T10:47:47.471Z","status":"ssl_error","status_checked_at":"2026-02-05T10:45:08.119Z","response_time":65,"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":["emulator","javascript","raspberry-pi","raspberry-pi-pico","rp2040","simulation","simulator","typescript","wokwi"],"created_at":"2024-07-31T09:00:33.306Z","updated_at":"2026-02-05T11:04:47.178Z","avatar_url":"https://github.com/wokwi.png","language":"TypeScript","funding_links":[],"categories":["Tools","TypeScript"],"sub_categories":[],"readme":"![](../../actions/workflows/ci-test.yml/badge.svg) ![](../../actions/workflows/ci-micropython.yml/badge.svg) ![](../../actions/workflows/ci-pico-sdk.yml/badge.svg)\n\n# rp2040js\n\nRaspberry Pi Pico Emulator for the [Wokwi Simulation Platform](https://wokwi.com). It blinks, runs Arduino code, and even the MicroPython REPL!\n\n## Online examples\n\nIf you are just looking to play around with the Raspberry Pi Pico Simulator, check out the Wokwi Simulator:\n\n- [Raspberry Pi Pico Traffic Light](https://wokwi.com/arduino/projects/297322571959894536)\n- [LCD1602 Hello World](https://wokwi.com/arduino/projects/297323005822894602)\n- [MicroPython Blink](https://wokwi.com/arduino/projects/300504213470839309)\n- [MicroPython 7-Segment Counter](https://wokwi.com/arduino/projects/300210834979684872)\n\nFor more information, take a look at the [wokwi-pi-pico docs](https://docs.wokwi.com/parts/wokwi-pi-pico) and the [Pi Pico MicroPython Guide](https://docs.wokwi.com/guides/micropython).\n\nIf you want to develop your own application using the Raspberry Pi Pico simulator, the following examples may be helpful:\n\n- [Blink LEDs with RP2040js, from scratch](https://stackblitz.com/edit/rp2040js-blink?file=index.ts) - Press \"Run\" and patiently wait for the code to compile ;-)\n\n## Run the demo project\n\n### Native code\n\nYou'd need to get `hello_uart.hex` by building it from the [pico-examples repo](https://github.com/raspberrypi/pico-examples/tree/master/uart/hello_uart), then copy it to the rp2040js root directory and run:\n\n```\nnpm install\nnpm start\n```\n\nYou can also specify the path to the image on the command line and/or load an UF2 image:\n\n```sh\nnpm run start -- --image ./my-pico-project.uf2\n```\n\nA GDB server will be available on port 3333, and the data written to UART0 will be printed\nto the console.\n\n### MicroPython code\n\nTo run the MicroPython demo, first download [RPI_PICO-20230426-v1.20.0.uf2](https://micropython.org/resources/firmware/RPI_PICO-20230426-v1.20.0.uf2), place it in the rp2040js root directory, then run:\n\n```\nnpm install\nnpm run start:micropython\n```\n\nand enjoy the MicroPython REPL! Quit the REPL with Ctrl+X. A different MicroPython UF2 image can be loaded by supplying the `--image` option:\n\n```\nnpm run start:micropython -- --image=my_image.uf2\n```\n\nA GDB server on port 3333 can be enabled by specifying the `--gdb` flag:\n\n```\nnpm run start:micropython -- --gdb\n```\n\nFor using the MicroPython demo code in tests, the `--expect-text` can come handy: it will look for the given text in the serial output and exit with code 0 if found, or 1 if not found. You can find an example in [the MicroPython CI test](./.github/workflows/ci-micropython.yml).\n\n#### Filesystem support\n\nWith MicroPython, you can use the filesystem on the Pico. This becomes useful as more than one script file is used in your code. Just put a [LittleFS](https://github.com/littlefs-project/littlefs) formatted filesystem image called `littlefs.img` into the rp2040js root directory, and your `main.py` will be automatically started from there.\n\nA simple way to create a suitable LittleFS image containing your script files is outlined in [create_littlefs_image.py](https://github.com/tomods/GrinderController/blob/358ad3e0f795d8cc0bdf4f21bb35f806871d433f/tools/create_littlefs_image.py).\nSo, using [littlefs-python](https://pypi.org/project/littlefs-python/), you can do the following:\n\n```python\nfrom littlefs import LittleFS\nfiles = ['your.py', 'files.py', 'here.py', 'main.py']\noutput_image = 'output/littlefs.img'  # symlinked/copied to rp2040js root directory\nlfs = LittleFS(block_size=4096, block_count=352, prog_size=256)\nfor filename in files:\n    with open(filename, 'rb') as src_file, lfs.open(filename, 'w') as lfs_file:\n        lfs_file.write(src_file.read())\nwith open(output_image, 'wb') as fh:\n    fh.write(lfs.context.buffer)\n```\n\nOther ways of creating LittleFS images can be found [here](https://github.com/wokwi/littlefs-wasm) or [here](https://github.com/littlefs-project/littlefs#related-projects).\n\nCurrently, the filesystem is not writeable, as the SSI peripheral required for flash writing is not implemented yet. If you're interested in hacking, see the discussion in https://github.com/wokwi/rp2040js/issues/88 for a workaround.\n\n### CircuitPython code\n\nTo run the CircuitPython demo, you can follow the directions above for MicroPython, except download [adafruit-circuitpython-raspberry_pi_pico-en_US-8.0.2.uf2](https://adafruit-circuit-python.s3.amazonaws.com/bin/raspberry_pi_pico/en_US/adafruit-circuitpython-raspberry_pi_pico-en_US-8.0.2.uf2) instead of the MicroPython UF2 file. Place it in the rp2040js root directory, then run:\n\n```\nnpm install\nnpm run start:circuitpython\n```\n\nand start the CircuitPython REPL! The rest of the experience is the same as the MicroPython demo (Ctrl+X to exit, using the `--image` and\n`--gdb` options, etc).\n\n#### Filesystem support\n\nFor CircuitPython, you can create a FAT12 filesystem in Linux using the `truncate` and `mkfs.vfat` utilities:\n\n```shell\ntruncate fat12.img -s 1M  # make the image file\nmkfs.vfat -F12 -S512 fat12.img  # create the FAT12 filesystem\n```\n\nYou can then mount the filesystem image and add files to it:\n\n```shell\nmkdir fat12  # create the mounting folder if needed\nsudo mount -o loop fat12.img fat12/  # mount the filesystem to the folder\nsudo cp code.py fat12/  # copy code.py to the filesystem\nsudo umount fat12/  # unmount the filesystem\n```\n\nWhile CircuitPython does not typically use a writeable filesystem, note that this functionality is unavailable (see MicroPython filesystem\nsupport section for more details).\n\n## Learn more\n\n- [Live-coding stream playlist](https://www.youtube.com/playlist?list=PLLomdjsHtJTxT-vdJHwa3z62dFXZnzYBm)\n- [Hackaday project page](https://hackaday.io/project/177082-raspberry-pi-pico-emulator)\n\n## License\n\nReleased under the MIT licence. Copyright (c) 2021-2023, Uri Shaked.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwokwi%2Frp2040js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwokwi%2Frp2040js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwokwi%2Frp2040js/lists"}