PyRasp

What this Pico can and cannot do

This page is the honest boundary of the platform. Everything listed as working has a problem or a lesson that uses it; everything listed as not there is missing on purpose, not a bug you can code around.

The short version: one Pico, 3.3 V, real MicroPython, no network. If your design fits that, it will run.

Working — the exact list

AreaWhat worksThe exact APIWatch out for
GPIOGP0–GP22, GP26–GP28; inputs, outputs, pullsPin(n, Pin.OUT), Pin.IN, PULL_UP, PULL_DOWN, value(), on(), off(), toggle()3.3 V only; GP23–25 are not header pins
On-board LEDGP25, drawn on the boardPin(25, Pin.OUT)No wire, no header pin
PWMAny GPIO; duty and frequencyPWM(Pin(n), freq=…), duty_u16(0–65535), duty_ns(…), deinit()Duty is not a percentage; 65535 is full
ADCGP26, GP27, GP28; 12-bitADC(26), ADC(0)–ADC(2); ADC(4) internal temperature; read(), read_u16()0–3.3 V only; other pins raise an error
I²CAny SDA/SCL pair; scan, read, write, registersI2C(0, sda=Pin(4), scl=Pin(5)), scan(), writeto, readfrom, writeto_mem, readfrom_mem8-bit register addresses; 7-bit device addresses
SPIAny SCK/MOSI/MISO pins; write, read, exchangeSPI(0, baudrate=…, sck=…, mosi=…, miso=…), write, read, write_readintoChip select is a plain output pin you drive
UARTAny TX/RX pair; buffered inputUART(0, baudrate=…, tx=…, rx=…), write, any, read, readline, readintoThe other device must use the same baud
TimersPeriodic and one-shot callbacksTimer(), init(period=…, mode=Timer.PERIODIC, callback=…), deinit()Cooperative: runs in short slices during a sleep, not while a loop never sleeps
Pin interruptsRising/falling edge callbackpin.irq(trigger=Pin.IRQ_RISING | Pin.IRQ_FALLING, handler=…); irq.on()/off()Cooperative: checked during sleeps; a pulse shorter than the slice can be missed
SignalInverted/logical output wrapperSignal(pin, invert=True), on(), off(), value()Output only; use Pin.irq() for edges
OLEDSSD1306, 128×64, I²C at 0x3Cfrom ssd1306 import SSD1306_I2C; fill, text, show()Frozen driver; still an I²C device at 0x3C
TimeSleeps, tick counters and wall timeutime.sleep, sleep_ms, sleep_us, ticks_ms, ticks_us, ticks_diff, time.time()Simulated time; time.time() starts at 2024-01-01 UTC; ticks wrap
Board identityFrequency, unique id, resetmachine.freq(), machine.unique_id(), machine.reset()reset() starts the run again; files do not persist
LanguageThe Python you need for the coursevariables, if, while, for, functions, lists, tuples, dicts, classes, print, input()No pip, no network installs
Frozen modulesThe classroom sensor and display modulesneopixel, dht.DHT11/DHT22, ssd1306.SSD1306_I2CSame imports as a real Pico; no extra install

Electrical limits

These are the numbers the simulator enforces, taken from the RP2040 and Pico datasheets:

LimitValueWhat happens if you cross it
Logic high3.3 V—
GPIO absolute maximum3.6 V5 V on a GPIO damages the pin
Input low / highbelow 0.8 V / above 2.0 VIn between is undefined; do not design there
Current per GPIO12 mA safe (50 mA damage threshold)The pin warns, then damages
Current through the chip50 mA totalThe 3V3 rail warns and sags
3V3(OUT) budget300 mAThe rail cannot power a heavy load
ADC range0–3.3 V, 12 bitsAbove 3.3 V can damage the ADC pin
PWM duty0–65535, or nanosecondsOut-of-range values clamp or misbehave

The one rule that prevents most damage: a GPIO goes to 3V3, GND, a resistor, or a part that expects 3.3 V. It never goes to 5 V, and it never goes straight to GND while it is high.

Not there — and what to do instead

Not availableWhyDo this instead
Wi-Fi and BluetoothThis is a plain Pico, not a Pico WKeep the data on the board; print it or show it on the OLED
PIOThe programmable I/O state machines are not modelledUse SPI, I²C or UART — they cover the same devices
USB devicesOutside the simulated boardUse the serial monitor to talk to the program
The hardware watchdogOutside the simulated boardUse a timer and a state variable to recover in software
Files that survive a runThere is no flash on the simulated boardKeep values in variables; print results; download your source
adafruit_… and CircuitPython librariesThere is no package store for the PicoUse machine, framebuf, and the frozen neopixel, dht and ssd1306 modules
rp2 PIO and networkThe RP2040 PIO and Wi-Fi stack are not modelledImporting them raises a clear RuntimeError; use SPI/I²C/UART, and keep data on the board
A large Python standard librarystatistics, datetime, string, csv, turtle and packages are not installedUse the core language and the modules listed above; console problems stick to those basics
asyncio.runThe browser scheduler is driven by create_task() and awaitasyncio.run raises a clear RuntimeError; use create_task() and await
A desktop sys.platformThis is the webassembly MicroPython portsys.platform is webassembly; os.uname() reports the simulated Pico identity
16-bit I²C register addressesThe simulated devices use 8-bit pointersUse 8-bit registers, or split the address yourself
A second boardOne Pico per projectPut both devices on the same bus/pins
Real mains electricityNot modelled, and never safe in a classroom projectSwitch a low-voltage lamp, fan or pump through a relay module

Fun fact. “Not there yet” is a design decision, not a score. A simulator that pretends to have Wi-Fi teaches you to debug a network you cannot see. A simulator that says “no Wi-Fi” teaches you to solve the problem with the parts you have.

Deliberate differences from a real Pico

These are the places where the app is like a Pico but not identical. They matter for the lessons, and they matter if you carry a project to real hardware.

Timing is simulated

The CPU reports 133 MHz, but the program runs at your browser's speed. utime.sleep is the clock you can trust; instruction counting is not. A judged run can fast-forward through long sleeps, so a program that waits ten seconds finishes quickly in the judge. time.time() uses the simulated clock and a fixed 2024-01-01 UTC epoch, so two runs of the same program produce the same date and time.

Timer and pin-interrupt callbacks are cooperative

On a real Pico, a timer callback interrupts the main program. Here, the firmware advances a sleep in 5 ms slices and runs callbacks between them. This keeps the simulation deterministic and reproducible while letting a 100 ms timer fire ten times during a one-second sleep.

Consequences:

  • a main loop that never sleeps never lets a timer tick;
  • a timer fires close to its requested period during sleeps (within one 5 ms slice);
  • a pin IRQ checks the pin at each tick, so a very short pulse can be missed;
  • utime.sleep_ms(10) in a main loop is the usual, safe pattern;
  • in a judged run, timers and IRQs left running after main.py exits keep running to the end of the window.

There is no flash

The editor's files exist for the run. Values you keep in variables disappear when the run ends, and nothing survives Stop or machine.reset(). Download the sources if you want to keep them.

The board starts high-impedance

Unlike a Raspberry Pi, no GPIO reads high at reset. An input with no pull and no driver is floating: its value is undefined. This is the real Pico's behaviour, and it is the reason every button lesson starts with a pull-up or pull-down.

The simulated parts are ideal — mostly

Resistors have tolerance, LEDs have a forward voltage, servos have a dead band, and buttons bounce for a few milliseconds. But parts do not age, wires do not have resistance, and the room temperature does not change. When a check fails by a tiny amount, look for a real bug before blaming the parts.

Designing inside the box

Use this checklist before you start a project:

  1. Power: does every part have VCC and GND? Is the total under the rail's budget?
  2. Voltage: is every signal 3.3 V? Does anything need a driver (relay, MOSFET, H-bridge)?
  3. Pins: does the part need a special pin (ADC on 26–28, I²C/SPI/UART on any pins)?
  4. Timing: does the program sleep? Does a timer or signal need to run while it sleeps?
  5. State: what does the program remember between presses? What are the states?
  6. Output: how will you know it worked — an LED, the OLED, a printed line, a check?

If a requirement needs something in the “not there” table, change the requirement, not the simulator. That is what engineers do with real boards too.

See also