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.
Read a potentiometer on ring 2, set the LED's brightness on ring 1 from it, and draw a bar on the bottom row.
| Pin | Connects to | What it does |
|---|---|---|
P2 | Potentiometer middle leg | Analog in |
3V | Potentiometer outer leg | Top of the track |
GND | Potentiometer other leg and the LED | Ground |
P1 | LED long leg, through 470 Ω | PWM out |
Sensors and actuators this board drives, with the real connections.
Clip ring 1 to the LED's long leg through a 470 Ω resistor and the short leg to GND: about 3 mA.
| Part pin | Board pin |
|---|---|
| A | P1Wire colour yellow |
| K | GNDWire colour black |
A V2 pin gives only 1 to 4 mA. Never connect an LED without a resistor.
Ends to 3V and GND, wiper to ring 2: pin2.read_analog() gives 0 to 1023.
| Part pin | Board pin |
|---|---|
| 1 | 3VWire colour red |
| 2 | P2Wire colour green |
| 3 | GNDWire colour black |
Signal on ring 1: pin1.set_analog_period(20), then pin1.write_analog(51) to pin1.write_analog(102) for 1 to 2 ms pulses.
| Part pin | Board pin |
|---|---|
| signal | P1Wire colour orange |
| V+ | 3VWire colour red |
| GND | GNDWire colour brown |
An SG90 can pull hundreds of mA when it starts. Powered from the 3V ring it browns the board out; give it its own 4 to 6 V supply and join the grounds.