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 light-dependent resistor and a 10 kΩ resistor make a voltage divider. When the room gets dark, the reading drops and the LED comes on, like a night light.
| Pin | Connects to | What it does |
|---|---|---|
5V | One leg of the LDR | The top of the divider. |
A0 | Between the LDR and the 10 kΩ resistor | Reads higher as the light gets brighter. |
GND1 | The 10 kΩ resistor | The bottom of the divider. |
D9 | Resistor, then the LED | Lights the LED when it is dark. |
GND | The LED's short leg | Returns the LED's current. |
Sensors and actuators this board drives, with the real connections.
Ends to GND and 5V, the middle leg (wiper) to A0. analogRead(A0) then goes from 0 to 1023 as you turn it.
| Part pin | Board pin |
|---|---|
| 1 | GNDWire colour black |
| 2 | A0Wire colour green |
| 3 | 5VWire colour red |
From 5V to A0, with a 10 kΩ resistor from A0 to GND. More light, lower resistance, higher reading.
| Part pin | Board pin |
|---|---|
| 1 | 5VWire colour red |
| 2 | A0Wire colour green |
Flat face toward you: left leg 5V, middle leg to A0, right leg GND. Degrees C = (volts − 0.5) × 100.
| Part pin | Board pin |
|---|---|
| VS | 5VWire colour red |
| VOUT | A0Wire colour green |
| GND | GNDWire colour black |
Brown to GND, red to 5V, orange to a pin (D9). Servo.attach(9) then write(0..180).
| Part pin | Board pin |
|---|---|
| GND | GNDWire colour brown |
| VCC | 5VWire colour red |
| SIG | D9Wire colour orange |
A moving servo can draw 250 mA and a stalled one 700 mA. More than one servo needs its own 5 V supply, with the grounds joined.
AOUT to A0, VCC to 5V, GND to GND. The reading falls as the soil gets wetter.
| Part pin | Board pin |
|---|---|
| AOUT | A0Wire colour yellow |
| VCC | 5VWire colour red |
| GND | GNDWire colour black |
One leg to 5V, the other to A0, with a 10 kΩ pull-down from A0 to GND. Press harder, read higher.
| Part pin | Board pin |
|---|---|
| 1 | 5VWire colour red |
| 2 | A0Wire colour green |