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 28BYJ-48 stepper moves in exact steps, so the sketch knows where the wheel stops. Press the button and it spins, slows down and lands on a random prize.
| Pin | Connects to | What it does |
|---|---|---|
D8-D11 | The ULN2003 driver's IN1-IN4 | Switch the four coils in turn. |
5V | The driver board's + and the button | Powers the motor's coils. |
D2 | The button, with a 10 kΩ pull-down | HIGH starts a spin. |
Sensors and actuators this board drives, with the real connections.
Between D2 and GND with pinMode(2, INPUT_PULLUP): reads LOW while pressed. With an external pull-down to GND and the button to 5 V it reads HIGH while pressed instead.
| Part pin | Board pin |
|---|---|
| 1 | D2Wire colour blue |
| 3 | GNDWire colour black |