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 A0 and set the LED brightness on D5 with PWM, scaled with map().
| Pin | Connects to | What it does |
|---|---|---|
A0 | potentiometer wiper | analog input |
D5 | 220 Ω resistor and the green LED | PWM output |
3V3 | one end of the potentiometer | 3.3 V supply |
GND | other end of the potentiometer and the LED | ground |
Sensors and actuators this board drives, with the real connections.
Use pinMode(D5, INPUT_PULLUP); the pin reads LOW while the button is pressed.
| Part pin | Board pin |
|---|---|
| leg 1 | D5Wire colour white |
| leg 2 | GNDWire colour black |
Not on D3, D4 or D8: a pressed button or an external pull resistor there changes the boot mode. D0 has no pull-up.
Ends to 3V3 and GND, wiper to A0. The top 0.1 V of travel reads 1023 because A0's full scale is 3.2 V.
| Part pin | Board pin |
|---|---|
| end 1 | 3V3Wire colour red |
| wiper | A0Wire colour yellow |
| end 2 | GNDWire colour black |
LDR from 3V3 to A0 and 10 kΩ from A0 to GND: more light gives a higher reading.
| Part pin | Board pin |
|---|---|
| LDR leg 1 | 3V3Wire colour red |
| LDR leg 2 + 10 kΩ to GND | A0Wire colour yellow |
Runs from 3.3 V (2.7-5.5 V). 0.5 V means 0 °C and each 10 mV is 1 °C: °C = (raw x 3.2 / 1023 - 0.5) x 100.
| Part pin | Board pin |
|---|---|
| +Vs | 3V3Wire colour red |
| Vout | A0Wire colour yellow |
| GND | GNDWire colour black |
Servo library, signal on D5. The 3.3 V signal is enough for an SG90.
| Part pin | Board pin |
|---|---|
| orange (signal) | D5Wire colour orange |
| red (+) | VINWire colour red |
| brown (GND) | GNDWire colour brown |
Power it from Vin (about 4.65 V on USB), never from 3V3. Its stall current (several hundred mA) drags the supply down and resets the board, so give it its own 5 V supply with a shared GND for real work.
AO to A0, powered from 3V3 so the output never exceeds the 3.2 V range. Power it only while measuring to slow corrosion.
| Part pin | Board pin |
|---|---|
| VCC | 3V3Wire colour red |
| GND | GNDWire colour black |
| AO | A0Wire colour yellow |