Loading the figure…
Stopped · Your code isn't running yet. Until you press Run, the board runs the program already on it.
Nothing printed yet. Press Run.
Not checked yet
Run your code to check it. The checks replay a fixed script on a virtual clock, so the same code always gets the same result.
Each fault really happens in the simulation. Trigger one, watch the figure, then read why.
Play the world: press, slide and turn the parts while the code runs.
Change a value here or click a chip in the code.
Turn a potentiometer and the LED follows: the 12-bit ADC reading goes straight into a 16-bit PWM duty cycle.
| Pin | Connects to | What it does |
|---|---|---|
GP26 | Potentiometer wiper | ADC0 input |
3V3 | Potentiometer end | 3.3 V supply |
AGND | Potentiometer end | Analog ground |
GP15 | 330 Ω resistor and LED | PWM output |
Sensors and actuators this board drives, with the real connections.
A 5 mm LED from GP15 through a 330 Ω resistor to GND: (3.3 - 2.0) / 330 ≈ 4 mA for a red LED, within the pin's default 4 mA drive.
| Part pin | Board pin |
|---|---|
| A | GP15Wire colour orange |
| K | GNDWire colour black |
Never leave out the resistor: the pin would try to drive far more than 12 mA.
A 10 kΩ potentiometer: one end to 3V3 (pin 36), the other to AGND (pin 33), the wiper to GP26 / ADC0.
| Part pin | Board pin |
|---|---|
| 1 | 3V3Wire colour red |
| 2 | GP26Wire colour yellow |
| 3 | AGNDWire colour black |
Never put 5 V on the ends: the ADC pins take 3.3 V at most on every Pico.