All Projects → wokwi → rp2040js

wokwi / rp2040js

Licence: MIT license
A Raspberry Pi Pico Emulator in JavaScript

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to rp2040js

buzzer music
RPI Pico / Micropython library to play music through one or more buzzers, can automatically replace chords with fast arpeggios to simulate polyphony with a single buzzer. Music can be easily taken from onlinesequencer.net
Stars: ✭ 23 (-87.08%)
Mutual labels:  rp2040, raspberry-pi-pico
zeptoforth
A not-so-small Forth for Cortex-M
Stars: ✭ 70 (-60.67%)
Mutual labels:  rp2040, raspberry-pi-pico
pico i2c slave
I2C slave library for the Raspberry Pi Pico
Stars: ✭ 39 (-78.09%)
Mutual labels:  rp2040, raspberry-pi-pico
prk firmware
A keyboard firmware platform in PicoRuby
Stars: ✭ 337 (+89.33%)
Mutual labels:  rp2040, raspberry-pi-pico
wizio-pico
Raspberry Pi Pico development platform for PlatformIO
Stars: ✭ 119 (-33.15%)
Mutual labels:  rp2040, raspberry-pi-pico
Tricky68k
Motorola 68000 simulator for Mac OS X
Stars: ✭ 42 (-76.4%)
Mutual labels:  simulator
lifely
Lifely is a text-based life simulator with no graphics. Some features might be unstable as of now.
Stars: ✭ 21 (-88.2%)
Mutual labels:  simulator
EdgeSim
Simulate the real environment, perform edge computing, edge caching experiments
Stars: ✭ 53 (-70.22%)
Mutual labels:  simulator
rpi
Microcontroller projects (RPi, Arduino, ATTiny85, ESP, Pico, STM8/32)
Stars: ✭ 76 (-57.3%)
Mutual labels:  rp2040
SeQUeNCe
Simulator of QUantum Network Communication (SeQUeNCe) is an open-source tool that allows modeling of quantum networks including photonic network components, control protocols, and applications.
Stars: ✭ 44 (-75.28%)
Mutual labels:  simulator
epidemic-simulator
A HTML/JavaScript simulator for an epidemc on a population
Stars: ✭ 23 (-87.08%)
Mutual labels:  simulator
NASSP
Project Apollo - NASSP
Stars: ✭ 110 (-38.2%)
Mutual labels:  simulator
react-device-frameset
React device frameset component
Stars: ✭ 30 (-83.15%)
Mutual labels:  simulator
navdatareader
Navdatareader is a command line tool that uses the atools fs/bgl and fs/writer to store a full flight simulator scenery database into a relational database like Sqlite or MySql.
Stars: ✭ 35 (-80.34%)
Mutual labels:  simulator
dice-simulator
A Python simple Dice Simulator just for fun
Stars: ✭ 17 (-90.45%)
Mutual labels:  simulator
SpiceSharp
Spice# is a cross-platform electronic circuit simulator based on Berkeley Spice - the mother of commercial industry-standard circuit simulators.
Stars: ✭ 146 (-17.98%)
Mutual labels:  simulator
EnvOpenPico
An open source RP2040 MCU Board Family
Stars: ✭ 87 (-51.12%)
Mutual labels:  rp2040
community-projects
Webots projects (PROTO files, controllers, simulation worlds, etc.) contributed by the community.
Stars: ✭ 20 (-88.76%)
Mutual labels:  simulator
graspit
The GraspIt! simulator
Stars: ✭ 142 (-20.22%)
Mutual labels:  simulator
PandExo
A Community Tool for Transiting Exoplanet Science with the JWST & HST
Stars: ✭ 23 (-87.08%)
Mutual labels:  simulator

rp2040js

Raspberry Pi Pico Emulator for the Wokwi Simulation Platform. It blinks, runs Arduino code, and even the MicroPython REPL!

Online examples

If you are just looking to play around with the Raspberry Pi Pico Simulator, check out the Wokwi Simulator:

For more information, take a look at the wokwi-pi-pico docs and the Pi Pico MicroPython Guide.

If you want to develop your own application using the Raspberry Pi Pico simulator, the following examples may be helpful:

Run the demo project

Native code

You'd need to get hello_uart.hex by building it from the pico-examples repo, then copy it to the rp2040js root directory and run:

npm install
npm start

MicroPython code

To run the MicroPython demo, first download rp2-pico-20210902-v1.17.uf2, place it in the rp2040js root directory, then run:

npm install
npm run start:micropython

and enjoy the MicroPython REPL! Quit the REPL with Ctrl+X.

You can replace rp2-pico-20210902-v1.17.uf2 with any recent MicroPython or CircuitPython release built for the RP2040.

With MicroPython – and probably also CircuitPython – 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 formatted filesystem image called littlefs.img into the rp2040js root directory, and your main.py will be automatically started from there.

A simple way to create a suitable LittleFS image containing your script files is outlined in create_littlefs_image.py. So, using littlefs-python, you can do the following:

from littlefs import LittleFS
files = ['your.py', 'files.py', 'here.py', 'main.py']
output_image = 'output/littlefs.img'  # symlinked/copied to rp2040js root directory
lfs = LittleFS(block_size=4096, block_count=352, prog_size=256)
for filename in files:
    with open(filename, 'rb') as src_file, lfs.open(filename, 'w') as lfs_file:
        lfs_file.write(src_file.read())
with open(output_image, 'wb') as fh:
    fh.write(lfs.context.buffer)

Other ways of creating LittleFS images can be found here or here.

Currently, 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 #88 for a workaround.

Learn more

License

Released under the MIT licence. Copyright (c) 2021, Uri Shaked.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].