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.
A button on D2 counts presses with attachInterrupt() and toggles an LED on D13. The internal pull-up means the button needs no resistor, and a debounce time hides its contact bounce.
| Pin | Connects to | What it does |
|---|---|---|
D2 | One side of the button | Input with the internal pull-up, and an interrupt pin. |
D13 | 1 kΩ resistor, then the LED | Output: toggled on each press. |
GND | The button's other side and the LED's short leg | Pressed, the button pulls D2 down to GND. |
Sensors and actuators this board drives, with the real connections.
Long leg (anode) through a 1 kΩ resistor to D13, short leg to GND. 1 kΩ gives about 3 mA, well inside the R4's 8 mA per pin.
| Part pin | Board pin |
|---|---|
| A | D13Wire colour orange |
| K | GNDWire colour black |
Never without a resistor: an R4 pin is good for 8 mA, and a bare LED would try to pull far more.
Between D2 and GND with pinMode(2, INPUT_PULLUP): it reads LOW while pressed. D2 and D3 also take attachInterrupt().
| Part pin | Board pin |
|---|---|
| 1 | D2Wire colour yellow |
| 3 | GNDWire colour black |