Site Guide

Find your way around the Engineering Club.

Know what you need? Search for a component, concept or project.

Around the site

Start

Labs

TestingExperimental

Build

Club

LearnExperimental

Go a little deeper

Entry points to larger collections. Use Search for individual records.

Learning paths & reference

Inside PiCrawlerExperimental

Inside Inventory

← Learn

LEARN · START HERE

Start here: make sense of the whole system

You do not need to have used electronics, programming tools or Git before. We will make sense of one small project: a light controlled by a board. First we will explain the pieces, then connect what you type to what you see. Read in order the first time. Afterwards, use the basic reference to look up a word.

Part 1 of 9

0. What are we doing?

We are building things that can sense or change the physical world. A light can turn on, a button can be detected, and a motor can move. Some parts provide energy; others carry information about what should happen. We write instructions on a computer and send a runnable version to a small board. The board reads or changes electrical conditions according to those instructions. Connected parts turn those changes into light, measurements or movement. Our first success is understanding why a light blinks, rather than just copying a picture.

Part 2 of 9

1. The whole system

You choose a behavior, such as “turn the light on, wait, then turn it off.” On your computer, a machine that follows instructions and remembers information, you write code: instructions expressed in a programming language. A language has exact rules; the board does not understand the ordinary English sentence above.

Build turns the written code into a form the chosen board can run. Upload sends that built program to the board. A board is a physical assembly of electronic parts. Its small controlling computer follows the program and controls electrical connections called pins. Wires join these connections to other parts. The resulting circuit, an arrangement of electrically connected parts, makes something physical happen.

For our light, the program tells the board when to create the electrical difference that makes this light circuit work. The next part will explain that difference as voltage. The board's power connection supplies the energy that makes the light shine. Instructions are information; the light still needs electrical energy. A USB cable—the common computer cable that can carry power and data—can do both jobs for our first board. The software journey and the energy journey meet at the board.

The whole-system diagram separates those journeys. The software-to-hardware explanation explains every step after the pieces below are familiar.

The whole systemConnect human intention to a physical result without conflating information and energy.

Information / program transfer

  1. personthen
  2. computerthen
  3. source codethen
  4. Buildthen
  5. Upload

↓ Upload to board

  1. boardthen
  2. pinsthen
  3. circuitthen
  4. physical result

Power / energyUSB power → board and circuit

A person writes code on a computer. Build produces board-specific firmware. Upload transfers it. The board follows it, changes electrical pins, and a connected circuit produces light or another physical result. USB power separately provides energy.

Connections and limits

Person chooses behavior and writes code on the computer. Build transforms code; Upload transfers firmware to the board. The running board changes pins; connected circuitry produces the physical result. A separate power path supplies energy to board and circuit.

Code is information, not the energy consumed by an LED. Build and Upload are separate. GPIO cannot supply arbitrary loads.

Quick definitions for this part
Go deeper into this part

Part 3 of 9

2. The physical world: electricity and connected parts

Materials contain particles with electric charge, a property that causes electrical attraction and repulsion. Metal contains charges that can move. In our circuits, electricity involves these charges and the transfer of energy. A power source, such as a battery or suitable USB supply, provides that energy. A wire has conductive metal inside: “conductive” means charge can move through it. Its outer covering usually keeps that metal from touching unintended places.

An electrical connection means conductive parts are actually joined. Being nearby, or having plastic surfaces touch, is not enough. A component is one part of the arrangement, such as a light or a switch. A circuit arranges the connections between components. For sustained current in our simple battery or USB-powered example, there must be a complete path through the parts and back to the source. Some of that return path is inside the board.

Voltage describes electrical energy difference per unit of charge between two points. It is measured in volts, written V. Current is the rate at which charge passes a point, measured in amperes, or amps, written A. A milliamp, mA, is one thousandth of an amp. Resistance describes opposition to current for a given voltage difference, measured in ohms, written Ω. A resistor is a component chosen to provide resistance. Power is the rate of energy transfer, measured in watts, written W. These are different quantities; voltage is not “how much electricity” and current is not “how much voltage.”

Current in one unbranched path does not disappear after passing through a component. Energy is transferred, for example into light and heat. A source rated for a maximum of 2 A does not force 2 A through every connected part: the connected circuit determines the current. Its rating still limits what it can safely supply.

A closed circuit has an unbroken electrical path. An open circuit has a break, such as a loose wire or open switch, so sustained current cannot take that path. A short circuit is an unintended low-resistance connection that bypasses the intended path. Joining power directly to its return can cause excessive current. Disconnect power before changing uncertain wiring.

Ground, often labeled GND, is the circuit's chosen zero-volt comparison point and commonly a return connection. It does not mean electricity vanishes into Earth. A pin's voltage is usually stated relative to this point. Polarity means connection direction matters: the two ends of some parts are not interchangeable.

An LED, short for light-emitting diode, makes light when enough current flows through it in its allowed direction. A diode is a component that conducts much more easily in one direction. The LED's two connections are called anode and cathode. For our circuit, the anode faces the resistor and output pin; the cathode faces ground. On many ordinary new LEDs the longer leg marks the anode and a flat rim marks the cathode, but trimmed legs and different packages need their own markings checked. An ordinary LED needs current limiting: use a suitable resistor in the same path. Both legs in one connected breadboard group bypass the LED; both resistor ends in one group bypass the resistor.

A breadboard lets you temporarily connect parts without permanently joining their metal with solder. Hidden metal contacts join some holes together. On a common board, each group of five holes on one side of the central gap is joined; the group across the gap is separate. Long side strips used for power can have breaks. Inspect the actual board rather than assuming every hole in a visible row is connected. A jumper wire is a short wire with ends shaped to fit these temporary connections.

Pressing a button changes whether electrical contacts touch. That can change a voltage the board reads. A sensor turns something physical, such as light or temperature, into a measurable electrical change. An actuator changes something physical when supplied and controlled appropriately: an LED produces light, and a motor produces movement. Motors generally need a separate power path and a driver, an extra circuit that switches their current under the board's control. Do not power a motor directly from an ordinary board pin.

A potentiometer is an adjustable resistor arrangement, often with a turning knob. In a later lab, its two outer connections go across a suitable supply and its middle connection provides a changing voltage. It is a useful first sensor-like input. For now, recognize its job; detailed measurement and equations belong in the Electronics guide. The circuit explanation follows one complete LED path.

Hidden breadboard contactsShow actual contact groups rather than proximity.
Group A
●a1●b1●c1●d1●e1
Group B
●a2●b2●c2●d2●e2
central gap
Group C
●f1●g1●h1●i1●j1
Group D
●f2●g2●h2●i2●j2
Side strip · group 1Possible breakSide strip · group 2
a1, b1, c1, d1, e1; separate group: a2, b2, c2, d2, e2; separate group: f1, g1, h1, i1, j1; separate group: f2, g2, h2, i2, j2

On this common example, a1, b1, c1, d1 and e1 are joined internally. Row 2 is separate. The f1–j1 holes across the gap are separate from a1–e1. Long side strips may break halfway. Check the actual board.

Connections and limits

The five holes a1–e1 share one contact. a2–e2 are a different contact. f1–j1 across the gap are another contact. Different groups are not connected unless an actual wire or component joins them. Side strips vary and may be split.

Illustrate a common board, not a universal layout. Use lowercase contact coordinates as illustrative labels only. Never color an entire ten-hole row as connected; do not infer continuity from printed red/blue marks.

Quick definitions for this part
Go deeper into this part

Part 4 of 9

3. What is the board?

A computer has a processor, the part that follows machine instructions, and memory, places where it holds instructions or information. A microcontroller combines a processor, memory and connections for controlling or measuring things in a small chip. A development board puts that chip on a board with convenient power, programming and connection hardware. You normally handle the board, not the bare chip.

Arduino can mean a family of boards or a software ecosystem. Our first labs use an Uno R3 board. A Pico is a different family of microcontroller boards. ESP32 names another chip family and boards built around it; many support wireless communication. A Raspberry Pi 4 or 5 is a single-board computer, often abbreviated SBC, normally running a full operating system—the software managing the computer and its programs. A Raspberry Pi Pico is a microcontroller board. Similar branding does not mean they run the same programs or accept the same voltages.

The program stored for the microcontroller is often called firmware. It usually remains stored when power is disconnected. Working values may not: memory used while running and storage that retains a program have different jobs. When power returns, the board starts the stored program again.

A pin is an electrical connection on the chip or board. Some pins provide power; others carry signals, electrical changes used to represent information. GPIO means general-purpose input/output: connections a program can read or control. An input reads a signal coming into the board, such as a button's state. An output controls a signal leaving it, such as the signal driving an LED circuit. These words describe direction relative to the board.

Digital uses separate states. HIGH and LOW are names for the two digital states, represented by different voltage ranges. They do not mean any universally safe voltage. An Uno R3 uses approximately 5 V output HIGH under suitable conditions; Pico and typical ESP32 boards use 3.3 V signals. A logic voltage means a voltage used for these digital states. Never assume a 3.3 V pin can accept 5 V.

Analog describes a quantity that can vary continuously, such as the voltage from a turning potentiometer. An analog-to-digital converter, or ADC, measures such a voltage and reports a number. PWM, pulse-width modulation, switches an output on and off quickly while changing the fraction of time it is on. That can change perceived LED brightness; it is not necessarily a smoothly adjustable voltage.

USB is the computer connection used here for power and communication. A cable that only charges may supply power without carrying the data needed for Upload. The connector fitting is not proof of data capability. See the Microcontrollers guide when you want to understand the chip more deeply.

Input and output are relative to the boardShow sensing and acting as separate electrical relationships.

Input · Uno D2 uses INPUT_PULLUP: released HIGH, pressed LOW to GND

  1. button contactschanges contacts
  2. defined input circuitread voltage
  3. microcontroller input

↓ program reads condition and chooses action

Output

  1. microcontroller outputcontrols current
  2. resistor + LED

Pressing a button changes which contacts touch. Its defined input circuit produces a readable voltage state. The program reads that state and chooses an output. The output controls current through a resistor and LED.

Connections and limits

Button contacts change a voltage in a properly defined input circuit; the microcontroller reads it. Program logic then chooses an output state driving the resistor/LED circuit.

A button does not send an English instruction. Specify a resting input level with the reviewed lab’s pull resistor arrangement; do not imply the input floats safely. An LED output needs current limiting.

Quick definitions for this part
Go deeper into this part

Part 5 of 9

4. What is code?

Written source code describes a program, an organized set of instructions. A machine instruction is an operation the processor can follow directly. Our written C++ is transformed into many such instructions during Build. C++ is the programming language used in the club's first microcontroller projects.

A statement expresses an action in the language, such as asking a pin to change. A value is information a program uses: a number, character or true/false state, for example. When a program needs to remember a value under a name, it uses a variable. A type describes what kind of value it is and which operations make sense. In C++, int describes a whole-number type and bool describes a true/false type. True means a condition holds; false means it does not. A stored value is represented in memory, not literally written on a tiny label inside the chip.

Programs often group instructions that perform a particular job. A function names such a group. Calling a function asks for that job to run. An argument is information supplied to that call. A return value is information a function gives back to the caller, if it gives any. For example, a reading function can return a number representing a measured voltage. A condition is a test that produces a true/false answer. if chooses an action when a condition is true; else chooses an alternative when it is false.

Repetition, often called a loop, runs instructions again. for is commonly used when you track repeated steps with a counter; while repeats while a condition remains true. A condition that never becomes false may keep it running indefinitely. These language features are different from the Arduino function named loop().

Our projects use the Arduino framework: support code providing convenient functions for the board. A library is reusable code supplying particular jobs. The framework calls our setup() function once at startup, then calls our loop() function repeatedly after each call finishes. A comment is a note in the source for people; it does not perform an action. A bug is a mistake in intended behavior. Debugging means investigating what actually happens to locate and correct such a mistake.

You do not have to memorize these words. The code explanation uses one tiny program and shows their roles. The C++ guide provides the later technical depth.

Setup once, loop repeatedlyExplain framework calls without equating loop() with language loop syntax.
  1. startupthen
  2. setup()then
  3. loop() callthen
  4. call returns

↺ call returns → loop() call

reset → startup

At startup setup runs once. Then loop runs and returns. The framework calls loop again, repeating until execution stops or resets. delay waits within a call; setup runs again after a new startup.

Connections and limits

The Arduino framework initializes startup, calls setup once per startup, then calls loop again whenever the previous call returns. A wait delays progress; power loss stops execution and a restart begins again.

loop() is a function repeatedly called by the framework. for and while are separate C++ statements. Do not draw a second setup call on every repetition or imply reset retains ordinary working values.

Quick definitions for this part
Go deeper into this part

Part 6 of 9

5. What are the tools doing?

A file is a named piece of stored information. A folder groups files and possibly more folders. A project is the related files and settings for one thing you are building. An editor lets you change text in files. VS Code is our editor. It is an application, not the C++ language. An extension adds capabilities to it.

The PlatformIO IDE extension manages embedded projects inside VS Code: embedded means software for a device such as our board. It coordinates Build and Upload. A compiler translates source according to the chosen language and processor. A linker combines translated pieces and support code into the runnable result. Together with other programs these are a toolchain, the set of tools needed to produce a program. PlatformIO chooses these using the project's settings; it is not a programming language.

The project's platformio.ini file names a build environment, a set of settings selecting the board, supporting software and tools. “Environment” here means settings, not the room. Follow the lab's reviewed Uno environment for an Uno. Changing the board without changing and reviewing these settings is not enough. Club projects use ordinary C++ files, typically src/main.cpp, and explicitly include the Arduino support declarations with #include <Arduino.h>.

Save writes your edits to the file. Build then translates and combines them. An error means a tool could not complete the requested operation; read its message. A warning flags something suspicious even if Build succeeds; understand it rather than automatically ignoring it. Upload transfers a successfully built program to the selected board. Upload may trigger Build first, but the jobs remain different. A failed Upload can leave an older program running.

A serial connection sends information in sequence. The Serial Monitor displays messages sent through such a connection by the board. Nothing useful appears unless the program sends it, and the monitor's communication speed must match the program's setting. A port here is the computer's named communication connection to the board; it is different from a physical socket's shape.

A terminal is a text window for interacting with programs. A shell is the program that reads typed commands, instructions telling a tool what to do. A command is not automatically C++ and is not something to paste inside loop(). You can use PlatformIO's visible Build and Upload controls without learning many shell commands today. The PlatformIO guide and VS Code guide explain the tools in depth.

Build is not UploadSeparate creation of firmware from its transfer and execution.

Build · creates firmware from saved source

  1. src/main.cppthen
  2. compilerthen
  3. linker + support codethen
  4. firmware

↓ firmware to Upload

Upload · transfers firmware via Uno USB-to-serial

  1. Uploadthen
  2. Uno flashthen
  3. running processor

reviewed Uno board environment; USB data required

Save the C++ file. Build compiles it and links support code into firmware for the selected board. Upload transfers firmware into the Uno’s retained flash storage. When powered or restarted, the processor runs that stored program.

Connections and limits

Saved C++ source is translated by a compiler. A linker combines translated pieces and support code into firmware. Upload transfers it through the reviewed Uno USB-to-serial/programming route into flash. At startup the processor follows the stored instructions.

Some Upload commands build first, but creation and transfer remain separate. A successful build does not update the board; a failed upload can leave old firmware. The Uno transport description is board-specific.

Quick definitions for this part
Go deeper into this part

Part 7 of 9

6. What are Git and GitHub doing?

After editing files, you may want to record exactly what they looked like at a useful point. Git is the local version-history system that does this. GitHub is an online service that hosts Git projects and supports collaboration. Git can work without GitHub or an internet connection.

A repository is a project with Git's recorded history and related information. Your working files, or working tree, are the files you currently edit. Save updates a working file. Status reports its relationship to recorded versions and selected changes. A diff shows differences, usually as removed and added lines.

Staging selects the file contents for the next record; Git calls this selection the index. A commit records that selection as a point in local history with a message. If you edit a file after staging it, the later edits are not automatically in that staged selection. History is the connected series of commits, letting you inspect earlier records and compare changes.

A branch is a movable name pointing to a line of work in that history. Main is a common name for a project's shared branch, not a magic copy containing every local edit. A clone makes a local copy of a repository and its history. A remote is a named connection to another repository, often on GitHub. Push sends local commits and requests updates there; it does not send every unsaved or uncommitted edit. Pull fetches history from another repository and integrates it into the current branch; conflicting changes can require attention.

The three actions are distinct: Save updates a file, Commit records selected contents locally, and Push shares commits with another repository. For a first board experiment, understand the distinction before taking on a collaboration workflow. The Git explanation gives a small example; the Git and GitHub guide gives the full model.

Save, select, record, shareExplain file state, selected content and local versus shared history.

Save updates working files only

  1. working filesStage: select contents
  2. staged selectionCommit: record locally
  3. local commit historyPush: share commits
  4. GitHub-hosted repository

Save writes the local working file. Stage selects its current contents. Commit records selected contents in local history. Push shares commits with another repository, which may be on GitHub.

Connections and limits

Save changes working files. Stage copies selected content into the index. Commit records that selection locally. Push shares commits and requests a remote branch update. Later working edits are not automatically staged, committed or pushed.

Do not draw Save directly updating GitHub. Git is the history system; GitHub is one hosting service. Staging captures current content, not all future edits.

Quick definitions for this part
Go deeper into this part

Part 8 of 9

Use the club's Uno R3 setup, a USB data cable, a breadboard, jumper wires, an ordinary LED and a 330 Ω resistor. Here Ω means ohms, the resistance unit introduced above. This is a small low-voltage learning circuit, not a recipe for powering a motor or an unfamiliar module. If this is your first Upload, first try Onboard LED: First Blink: its light is already wired on the board. Then use External LED: Build the Circuit for the reviewed setup and wiring details.

Connect the physical path. Unplug USB before wiring. Connect the Uno's numbered output D8 to one end of the resistor. Connect the other resistor end to the LED's anode. Connect the cathode to the Uno's GND. On a breadboard, use three separate connected groups: A joins the D8 wire and resistor first leg; B joins its other leg and LED anode; C joins LED cathode and GND wire. A, B and C are labels for groups you choose, not printed socket names. Each pair must make metal contact through its group; no two of these groups may be accidentally joined. The board and USB power connections complete the return path internally.

Write the instructions. In the lab's reviewed PlatformIO Uno project, replace the contents of src/main.cpp with this complete example. Do not append a second pair of setup() and loop() functions. A path such as src/main.cpp means the file main.cpp in the folder src.

cpp
#include <Arduino.h>

const int LED_PIN = 8;

void setup() {
    pinMode(LED_PIN, OUTPUT);
}

void loop() {
    digitalWrite(LED_PIN, HIGH);
    delay(1000);
    digitalWrite(LED_PIN, LOW);
    delay(1000);
}

#include <Arduino.h> makes the Arduino function names and constants available to this C++ file; the framework's actual support code is supplied during Build. const int LED_PIN = 8; gives the whole-number value 8 a name we keep unchanged: const means this named value cannot be reassigned. The name matches the D8 wire. The equals sign here supplies its initial value.

void setup() defines our startup function. void says it returns no value. The empty parentheses mean we give it no arguments. Braces { and } group the function's statements. pinMode(LED_PIN, OUTPUT); asks the support code to configure pin 8 to drive an output. Its arguments appear inside parentheses and are separated by a comma. OUTPUT is the framework's name for that mode. A semicolon ends each of these action statements.

void loop() defines the function the framework calls repeatedly. digitalWrite(LED_PIN, HIGH); requests the high digital state on pin 8. In this particular wiring it establishes a voltage difference across the resistor and LED, allowing current and producing light. delay(1000); waits 1,000 milliseconds—one second—before the next statement; it does not create the light. digitalWrite(LED_PIN, LOW); brings the output near ground in this example, removing the forward-driving difference so the light turns off. The last wait keeps it off for one second. After the closing brace, the framework calls loop() again. HIGH does not universally mean “a light is on”; that depends on the circuit.

Make and transfer the runnable program. Save the file. With the reviewed Uno environment selected, run Build and read the result. Fix reported errors before expecting new firmware. Check the three-group wiring, reconnect USB, select the actual board connection if needed, and run Upload. Wait for success. On successful Upload, the program is stored in the board’s flash memory, which retains it when unplugged; powering the board again restarts it. Watch for at least two full on/off cycles. Now you have evidence that the written instructions, board settings, transfer, pin and circuit work together.

If Upload fails, investigate the data cable, selected board, connection and tool message; the LED may still be showing old firmware. If Upload succeeds but the LED is dark, disconnect power and check LED direction, breadboard contacts, the resistor path and the agreement between D8 and LED_PIN. Change one thing at a time. Do not “fix” darkness by removing the resistor. Electrical energy comes from USB through the board; the program chooses when the output enables this circuit's current.

The complete LED pathExplain the visible series circuit and its internal power return.
  1. Uno D8current
  2. 330 Ω resistorcurrent
  3. LED anode → cathodereturn
  4. GND
USB-powered board internals↺ GND through board/USB return to source; source through output driver to D8

330 Ω means 330 ohms; ordinary LED; unplug before changing wiring

D8 joins a 330-ohm resistor, then the LED anode; the LED cathode joins GND. Board internals connect this path to USB-supplied energy and return. HIGH lights this circuit, LOW turns it off. The program carries information; current supplies energy.

Connections and limits

When configured output HIGH, D8 drives the series resistor and forward-oriented LED to GND. Ground connects the return through board/USB wiring; the source and output driver complete the path. LOW removes forward drive in this arrangement.

Ground is a reference and return, not a charge sink. Current is the same along this unbranched external series path. The resistor limits current; LED direction matters. Do not draw source power shorted to GND.

Quick definitions for this part
Go deeper into this part

Part 9 of 9

8. Where to go next

Repeat onboard Blink if you want the simplest Build and Upload check. Try the external LED to connect software to a circuit you assembled. Then the pushbutton lab makes a physical input change an output. The potentiometer lab measures an adjustable voltage and uses rapid output switching to change brightness. These are invitations, not locked levels or prerequisites enforced by the site.

Use the first-day cheat sheet at the bench and What am I looking at? to recognize classes of parts. The curated basic reference contains short explanations of the words used here. The existing all-domain glossary is the larger technical lookup. For sustained depth, keep the existing guides: Electronics, Microcontrollers, C++, PlatformIO, VS Code and Git and GitHub. You can return to any point whenever a word stops making sense.

Try the idea at the bench

Try this lab: Onboard LED: First Blink →

The LED is already connected on the Uno, so you can observe the complete code–Build–Upload–board chain before assembling a circuit.

Try this lab: External LED: Build the Circuit →

Now that a connected path, an output, LED direction, Build and Upload have meaning, assemble the external light and watch software control your own wiring.

Try this lab: Pushbutton: Input Changes Output →

Pressing a button changes contacts; this lab turns that physical change into a reading and then a visible output, while introducing a defined resting input state.

Try this lab: Potentiometer: Measure and Dim →

Turn a knob to change a voltage, read a number representing it, and change perceived LED brightness with rapid output switching. It separates analog measurement from PWM output.

Optional reading suggestions

First day — start here

Read the nine small parts in order once, then try onboard Blink. This is a reading suggestion, not a tracked course.

  1. 0. What are we doing?
  2. 1. The whole system
  3. 2. The physical world: electricity and connected parts
  4. 3. What is the board?
  5. 4. What is code?
  6. 5. What are the tools doing?
  7. 6. What are Git and GitHub doing?
  8. 7. One complete example: make an external LED blink
  9. 8. Where to go next

Try this lab: Onboard LED: First Blink →

I have never touched electronics

Start with connected parts and energy, then see how the board controls a light.

  1. 1. The whole system
  2. 2. The physical world: electricity and connected parts
  3. 3. What is the board?
  4. 7. One complete example: make an external LED blink

Try this lab: Onboard LED: First Blink →

I have never programmed

Recognize instructions, values and functions before using Build and Upload.

  1. 1. The whole system
  2. 4. What is code?
  3. 5. What are the tools doing?
  4. 7. One complete example: make an external LED blink

Try this lab: Onboard LED: First Blink →

I have never used Git

Learn where files and commands live, then separate saving, recording and sharing.

  1. 5. What are the tools doing?
  2. 6. What are Git and GitHub doing?
I know code but not hardware

Focus on electrical connections, safe voltages and the circuit that makes the output observable.

  1. 2. The physical world: electricity and connected parts
  2. 3. What is the board?
  3. 7. One complete example: make an external LED blink

Try this lab: Onboard LED: First Blink →

I know hardware but not code

Connect familiar circuits to source instructions, tool actions and recorded work.

  1. 4. What is code?
  2. 5. What are the tools doing?
  3. 6. What are Git and GitHub doing?
  4. 7. One complete example: make an external LED blink

Try this lab: Onboard LED: First Blink →

Need a quick definition? Open Basic Reference →