Built-in project · no microcontroller

Hello, breadboard

A switch, a resistor and an LED: the first circuit, with the whole loop in view. There is no microcontroller in it: the simulator solves the 3 parts as a circuit, so it runs the moment you press Run, and nothing needs compiling.

StarterRuns in your browser. Free, and no account needed.

Hello, breadboardlive0.000 s 0.00x
Hold the button
The circuit itself, running here on the simulator. Press what can be pressed; click anything else to open it in the editor.

How it works

There is no microcontroller in this one, so nothing is compiled: the simulator solves the circuit itself. The file in the editor is the notes that come with it.

sketch.ino
// Hello, breadboard.
//
// There is no microcontroller here. Press Run and the simulator solves the
// circuit itself: the 5 V supply pushes current through the switch, the 220 ohm
// resistor and the LED, and back to ground.
//
// Click the slide switch while it runs. In position 1 the loop is closed and
// the LED lights; in position 3 the pole goes nowhere, the loop is open, and
// the LED is dark.
//
// The resistor is what keeps the LED alive. An LED is a diode: it holds close
// to its forward voltage (about 1.7 V for a red one here) and then takes
// whatever current you give it, so something has to set that current. 220 ohm
// on a 5 V rail gives about 15 mA, which is bright and safe. Change its value
// in the properties panel and watch the LED dim, and watch the drop fall with
// it: a diode's voltage follows its current, which is why 1.7 and not 2.0.

Parts list

5 parts, plus the jumper wires. Every one is in the editor's parts bin.

How it is wired

4 connections, pin by pin, read from the circuit itself. Each line is one set of pins joined together, by a jumper wire or a breadboard strip.

  • 5 V: Slide switch pin 1
  • Ground: LED, red pin C
  • Slide switch pin 2; Resistor, 220 Ω pin 1
  • Resistor, 220 Ω pin 2; LED, red pin A

Change it and keep it

Open it in the editor, change the circuit or the code, and keep your version in a free account.