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.
Change a value here or click a chip in the code.
The first line, starting on middle C.
tone() makes a square wave at any frequency on any pin. Put a piezo buzzer on D8, give it a list of notes, and it plays a tune.
| Pin | Connects to | What it does |
|---|---|---|
D8 | The buzzer's + leg | tone() drives it with a square wave. |
GND | The buzzer's − leg | Ground. |
Sensors and actuators this board drives, with the real connections.
+ to a pin, − to GND. tone(pin, frequency) plays a note; a piezo draws only a few mA, so no resistor is needed.
| Part pin | Board pin |
|---|---|
| POS | D8Wire colour orange |
| NEG | GNDWire colour black |