IT Course Directory: VMware, Linux, Networking, and Raspberry Pi

Free Raspberry Pi Course: Getting Started with Hardware, Linux, GPIO, and Projects

Learn Raspberry Pi setup, Raspberry Pi OS, Linux, networking, Python, GPIO, electronics, sensors, troubleshooting, and beginner projects.

Welcome to the Raspberry Pi Course

This course teaches you how to choose, set up, use, program, and troubleshoot a Raspberry Pi. You will begin with the computer itself, install an operating system, learn essential Linux commands, connect remotely, write Python programs, and build safe GPIO electronics projects.

The course is suitable for beginners, students learning physical computing, makers, and educators. Basic computer operation and internet use are helpful. Previous programming or electronics experience is useful but not required.

Use the Raspberry Pi course curriculum to follow the lessons in order, and use this learner activity area to review course events and progress.

What Is a Raspberry Pi?

A Raspberry Pi is a compact single-board computer: a complete computer built on one circuit board. Depending on the model, it can run an operating system, connect to a network, display a graphical desktop, store files, and control electronic circuits.

A Raspberry Pi can be used for desktop computing, coding practice, media playback, network services, home automation, environmental sensing, camera projects, robotics, and Internet of Things systems. It can also act as a small web server, file server, monitoring station, or learning platform.

Raspberry Pi versus a microcontroller

A Raspberry Pi normally runs a full Linux operating system and can execute several programs at once. It has substantial storage, networking, USB support, and often a graphical desktop. It is well suited to applications that need files, Python libraries, databases, web interfaces, or remote administration.

A microcontroller board such as an Arduino is designed primarily to run one small program directly on a microcontroller. It usually starts quickly, uses less power, and provides predictable timing for simple control tasks, but it generally has fewer operating-system features. A Raspberry Pi and a microcontroller can also work together: the Pi can provide networking and high-level logic while the microcontroller handles precise, time-sensitive signals.

Raspberry Pi Models and Hardware Selection

Raspberry Pi families differ in processor performance, memory capacity, port selection, wireless features, power requirements, physical size, and GPIO availability. General-purpose Pi boards are intended for desktop use and demanding projects. Smaller or lower-power families are useful for compact embedded systems. Compute-focused boards and modular boards may require a separate carrier or more specialized setup.

Do not select a board only by its name. Check the exact model specification and the needs of the project. A desktop with several applications needs more memory and cooling than a simple sensor logger. A robotics project may prioritize size, power consumption, motor control, and camera support.

Component or connectorPurposeTypical useNotes by model
Processor and memoryRuns the operating system and programsDesktop applications, Python, serversPerformance and available memory vary significantly
USB portsConnect peripheralsKeyboard, mouse, storage, adaptersPort count and speed vary; demanding devices may need powered USB
HDMI or display connectionProvides video outputMonitor, television, display panelConnector size and display capability vary by model
Ethernet and Wi-FiProvides network accessInternet, SSH, servers, updatesSome boards provide one or both; wireless bands vary
Camera and display connectorsConnect compatible camera or display modulesPhotography, computer vision, touch displaysConnector type and software support depend on the board
microSD or other storageStores the operating system and filesBoot media, programs, project dataSome models support additional storage options
40-pin GPIO headerConnects software to electronicsLEDs, switches, sensors, displaysHeader layout and exposed pins depend on the model
Power inputSupplies regulated power to the boardNormal operation and peripheralsUse the supply and cable recommended for the specific model

Choose a compatible power supply first. An adapter with an unsuitable voltage, insufficient current, or a poor-quality cable can cause boot failures, random resets, storage corruption, warning indicators, or throttling. Throttling means reduced performance caused by temperature or inadequate power conditions.

Also select a suitable microSD card, case, cooling solution, display cable, keyboard, and mouse. Add a breadboard, jumper wires, LEDs, resistors, and sensors for electronics work. A fan or heatsink may be appropriate for sustained workloads, but cooling does not correct an unsuitable power supply.

Required Equipment and Safe Setup

ItemRequired or optionalPurposeCompatibility considerations
Raspberry Pi boardRequiredRuns the operating system and project codeConfirm the model supports the intended ports and software
Compatible power supply and cableRequiredProvides stable powerMatch the connector, voltage, current rating, and model requirements
microSD cardRequired for many modelsHolds the operating system and filesUse a reliable card with sufficient capacity and suitable speed
Operating system imageRequiredProvides the software needed to bootChoose an image compatible with the board and intended workload
Network or local access methodRequiredLets you configure and control the PiUse a monitor and input devices, Ethernet, Wi-Fi, or a headless setup
Monitor, keyboard, and mouseOptionalProvides local desktop accessCheck display cable and USB or Bluetooth compatibility
Case and coolingOptionalProtects the board and manages heatAllow access to ports and GPIO; use model-compatible cooling
Breadboard and jumper wiresOptionalPrototypes circuits without solderingCheck connections carefully because breadboard layouts differ
LEDs, resistors, switches, and sensorsOptionalBuilds hardware exercisesVerify voltage, polarity, current, and interface requirements

Handle the board by its edges and avoid static discharge. Keep drinks and conductive objects away from the circuit. Do not force connectors, insert a card incorrectly, or move jumper wires while powered. GPIO shorts can damage the board or attached components.

Use a controlled shutdown before disconnecting power. Removing power while the microSD card is being written can corrupt the filesystem. When working on a circuit, shut down the Pi, remove power, check the wiring, and only then reconnect power.

Installing and Booting Raspberry Pi OS

Raspberry Pi OS is a Linux-based operating system commonly used on Raspberry Pi hardware. Other operating systems can be useful for specialist tasks, but Raspberry Pi OS is a practical starting point because it supports the desktop, terminal, hardware interfaces, package management, and common educational tools.

  1. Identify the exact Raspberry Pi model and obtain a compatible operating system image.
  2. Install an operating-system imaging utility on another computer.
  3. Insert the microSD card into that computer and select the card carefully.
  4. Choose the operating system image and write it to the card. This erases existing data on the selected card.
  5. If the utility supports it, preconfigure the username, password, locale, wireless network, hostname, and SSH before writing the card.
  6. Safely eject the card, insert it into the Pi, connect the display and input devices if using local access, and apply power.

During first boot, configure the locale, keyboard layout, timezone, username, password, display settings, and network. Then install software updates before beginning a project:

sudo apt update
sudo apt full-upgrade

apt is the command-line interface for the Debian-family package manager used by Raspberry Pi OS. The first command refreshes available package information. The second installs available updates. Restart if the system requests it.

Headless setup

A headless setup operates the Pi without a directly attached monitor, keyboard, or mouse. Preconfigure network access and enable SSH with the imaging utility or configuration tools, boot the Pi, identify its address from the router or local network, and connect from another computer. Have a reliable way to discover the address and verify that SSH is enabled before removing local access.

Desktop and Linux Fundamentals

The desktop environment provides an application launcher, taskbar, file manager, terminal, and settings tools. Use the file manager to browse folders and mounted storage. Use settings to configure display, keyboard, network, users, and hardware interfaces. Use the terminal when a command is faster, repeatable, or required by documentation.

Linux organizes files in a directory tree. The root directory is written as /. A user's home directory is commonly under /home. Configuration and system files occupy other directories, and removable storage is mounted at a directory so its contents can be accessed. A user account has permissions that control whether it can read, write, or execute a file.

CommandPurposeExample useCaution or note
pwdPrint the current directorypwdUseful when a command uses a relative path
ls -laList files, including hidden files and detailsls -laCheck ownership and permission columns
cd <directory>Change directorycd DocumentsUse cd .. to move to the parent
mkdir <directory>Create a directorymkdir projectsChoose clear names and locations
cp <source> <destination>Copy a file or directorycp test.py projects/Take care not to overwrite the wrong file
mv <source> <destination>Move or rename a filemv old.py main.pyCheck the destination before moving
sudo apt updateRefresh package listssudo apt updateRequires network access
sudo apt full-upgradeUpgrade installed packagessudo apt full-upgradeReview proposed changes before confirming

Use sudo only for tasks that require administrator privileges. Do not routinely run development programs as the administrator account. Understand file ownership and permissions before changing them.

Networking and Remote Access

Connect through Ethernet for a simple, stable setup, or configure Wi-Fi with the correct network name, password, country, and wireless settings. An IP address is the network address used to reach a device. To inspect local information, run:

hostname -I
ip addr
uname -a

Use the address shown by hostname -I when connecting from another computer on the same local network. DHCP may assign a different address later, so a hostname, router reservation, or documented address can make repeat access easier.

SSH provides secure remote terminal access over a network. From another computer, use:

ssh <username>@<raspberry-pi-ip-address>

For remote desktop work, use a supported remote-desktop option when a graphical interface is necessary. Secure remote access with a strong unique password, regular updates, SSH key authentication where practical, and limited user accounts. Disable services you do not need and avoid exposing SSH or a remote desktop directly to the public internet. Prefer a VPN or another controlled access method for remote access from outside the home network.

Programming with Python

Python is a common beginner language for Raspberry Pi projects. A program is stored in a text file with a .py extension. Create a file in a text editor or integrated development environment, save it, and run it from the terminal:

python3 hello.py

Core ideas include variables for storing values, data types such as strings, integers, floating-point numbers, and booleans, conditionals for decisions, loops for repetition, functions for reusable behavior, imports for using libraries, and error handling for expected failures.

name = input("What is your name? ")

for count in range(3):
    print("Hello", name, count + 1)

try:
    number = int(input("Enter a number: "))
    print(number * 2)
except ValueError:
    print("Please enter a whole number.")

Keep project files in a named directory. Run small tests frequently, read error messages from the bottom upward, and change one thing at a time. Hardware programs should also clean up GPIO resources when they finish.

GPIO Fundamentals

GPIO means General Purpose Input/Output. GPIO pins allow software to read signals from inputs or write signals to outputs. A digital output is usually set to HIGH or LOW. A digital input reads a state that represents HIGH or LOW.

Physical pin numbering identifies a header position. BCM numbering identifies the processor's GPIO number. These are different systems. Select one convention and use it consistently in the code, wiring notes, and diagram.

Physical header pinBCM GPIO identifierCommon alternate functionExample use
1Not a GPIO3.3 V powerPower for a compatible low-current module
2Not a GPIO5 V powerPower only for devices designed for 5 V; never as a GPIO signal
6Not a GPIOGroundCommon electrical reference
11GPIO 17General-purpose digital I/OLED output or button input
13GPIO 27General-purpose digital I/OSwitch or sensor signal
3GPIO 2I2C SDAI2C data line
5GPIO 3I2C SCLI2C clock line
19GPIO 10SPI MOSISPI data from controller
21GPIO 9SPI MISOSPI data to controller
8GPIO 14UART TXSerial transmit
10GPIO 15UART RXSerial receive
Pin typeTypical roleVoltage or signal guidanceSafety warning
3.3 V powerPower compatible modulesRegulated 3.3 V supplyDo not short to ground or draw more current than allowed
5 V powerPower suitable peripheralsBoard supply voltageNever connect 5 V to a GPIO signal
GPIO inputRead a switch or sensorUse 3.3 V-compatible signals only5 V input can damage the Pi
GPIO outputControl an LED or logic inputHIGH is approximately 3.3 VDo not drive motors, relays, or high-current loads directly
GroundReturn path and shared referenceConnect circuit ground to Pi GNDMissing common ground can produce unreliable readings

A breadboard is a reusable prototyping board. Jumper wires connect the Pi to breadboard rows. A resistor limits current; an LED must have a current-limiting resistor in series. Pull-up and pull-down resistors give an input a defined idle state instead of allowing it to float. The circuit and Pi must share a ground connection.

Project 1: Blink an LED

Use BCM GPIO 17, physical pin 11, as the output. Connect GPIO 17 to one side of a resistor, connect the resistor to the LED's anode, and connect the LED's cathode to a ground pin such as physical pin 6. The anode is normally the longer leg; the cathode is commonly the shorter leg or the side with a flat edge. Confirm the component markings before powering the circuit.

from gpiozero import LED
from time import sleep

led = LED(17)

try:
    while True:
        led.on()
        sleep(1)
        led.off()
        sleep(1)
except KeyboardInterrupt:
    led.off()

Save this as blink.py and run python3 blink.py. Stop it with Ctrl+C. The GPIO library uses BCM numbering in this example. The resistor protects the LED and limits the current drawn from the GPIO pin.

Project 2: Button-Controlled LED

Connect a push button between BCM GPIO 2 and ground. Configure an internal pull-up, so the input normally reads HIGH and changes to LOW while the button is pressed. Connect the LED circuit to GPIO 17 as in the previous project.

from gpiozero import LED, Button
from signal import pause

led = LED(17)
button = Button(2, pull_up=True)

button.when_pressed = led.on
button.when_released = led.off

try:
    pause()
finally:
    led.off()

A switch can have multiple terminals whose electrical connections change when pressed. If the input always has one value, check the switch terminal layout, selected GPIO, common ground, and pull-up or pull-down configuration. Turn off power before moving wires.

Sensors, Actuators, and Interfaces

A sensor measures something, such as temperature, motion, light, distance, pressure, or humidity. An actuator causes an action, such as producing sound with a buzzer, switching a relay, moving a motor, or illuminating an LED.

GPIO pins are not general-purpose power drivers. A motor, relay coil, or other high-current load usually needs a transistor or driver board, a flyback diode where appropriate, and possibly a separate power source. A relay module must be compatible with 3.3 V control signals. Keep external power grounds connected appropriately, and never experiment with mains voltage unless you have specialist electrical knowledge and suitable certified equipment.

Common communication buses include:

  • I2C: a two-wire bus using SDA for data and SCL for the clock. Multiple devices can share the bus when addresses do not conflict.
  • SPI: a faster serial protocol commonly using clock, controller output, controller input, and one or more chip-select lines.
  • UART: an asynchronous serial interface using transmit and receive lines. The transmit line of one device connects to the receive line of the other.

Enable I2C, SPI, UART, camera, or remote desktop only when required, using the operating-system configuration utility or desktop settings. Restart if requested. Then check the device address, overlay or interface setting, library, permissions, supply voltage, and wiring. A sensor may need level shifting if its signals are not 3.3 V safe.

Project Workflow

  1. Write the goal and measurable requirements. Decide what the project should sense, decide, display, or control.
  2. Choose a board and list every required part, including power, mounting, cables, and protection components.
  3. Draw the circuit and document physical and BCM pin assignments.
  4. Install the operating system, update it, and create a clean project directory.
  5. Test power and the operating system before connecting electronics.
  6. Run a minimal script, then test one component at a time.
  7. Combine tested components gradually and add error handling.
  8. Record dependencies, configuration choices, device addresses, wiring changes, and code revisions.
  9. Test normal operation and failure cases, then document the final build.

Incremental testing makes faults easier to isolate. Test the Pi alone, then a simple Python program, then one output, then one input, and only afterward combine sensors and actuators.

Maintenance, Reliability, and Troubleshooting

Apply operating-system and package updates safely. Keep backups of important files on another computer or storage device. For a reproducible installation, create a backup image of the microSD card when the system is in a known-good state, and test that the backup can be restored.

sudo reboot
sudo shutdown -h now

sudo reboot restarts the system. sudo shutdown -h now safely halts it. Wait for shutdown to complete before removing power. Avoid pulling the plug while files are being written.

SymptomLikely causesChecksResolution
Pi does not bootBad image, failed microSD card, insufficient power, display issueCheck power, card, image, cable, and display input; disconnect nonessential peripheralsUse a suitable supply, reimage or replace the card, and test a known-good display or headless network access
Unexpected shutdowns, warning icons, or poor performanceUndervoltage, poor cable, overheating, high peripheral demandInspect power warnings, temperature, airflow, and connected devicesUse a suitable supply and cable, improve cooling, or use powered peripherals
SSH connection failsSSH disabled, wrong IP, different network, bad credentials, firewallRun hostname -I locally and verify network reachability and SSH settingsEnable SSH, correct the address or credentials, and connect over the same trusted network
Wi-Fi will not connectWrong credentials, weak signal, regional settings, unsupported band, access restrictionCheck credentials, country settings, signal, router DHCP, and restrictions; test EthernetReconfigure wireless, move closer, or use Ethernet while diagnosing
LED does not lightReversed polarity, wrong pin convention, missing ground, bad mode, loose or damaged partsPower down and verify pin number, resistor, LED direction, ground, and minimal codeCorrect wiring or code and test with a known-good LED and resistor
Button always reads one valueMissing pull resistor, wrong wiring, wrong GPIO, misunderstood switch terminalsCheck continuity, input configuration, selected pin, and printed readingsAdd an internal or external pull resistor and correct the wiring
I2C or SPI sensor is not detectedInterface disabled, wrong wiring or voltage, wrong address, missing libraryVerify bus settings, ground, supply, SDA/SCL or SPI lines, address, and documentationEnable the interface, correct connections, install the required library, and use the correct address
Permission deniedIncorrect ownership, permissions, group membership, or need for elevated privilegeInspect file permissions and ownership; identify whether the hardware access group is requiredFix the specific permission, use sudo only when necessary, and avoid administrator development workflows

Course Progress and Learning Activities

Work through the course as a sequence of lessons, quizzes, assignments, project submissions, and reviews. A useful learning path is: boot and explore the desktop, update the system, connect through SSH, write a Python program, blink an LED, read a button, connect a supported sensor, and submit a documented automation project.

Activity eventMeaning for learner progressTypical next action
EnrollmentThe learner has joined the courseOpen the curriculum and begin the first unit
Course started or resetThe learning sequence has begun or been returned to its initial stateReview prerequisites and complete the next lesson
Unit completedThe learner finished a lesson or sectionAttempt the quiz or continue to the next unit
Quiz attemptedThe learner submitted answers for assessmentReview feedback and retry or continue according to the result
Assignment submittedA project, report, code sample, or wiring evidence was sent for reviewCheck evaluation feedback and revise the work if needed
Evaluation recordedAn instructor or course system assessed submitted workStudy comments and apply improvements
Badge or certificate earnedA completion or achievement requirement was metSave the record and continue practicing with a new project
Comment leftThe learner added a question, observation, or reflectionCheck for replies and update the project notes
Course update or announcementImportant information was posted for learnersRead the update and adjust the next task if necessary

The learner activity area can filter announcements, course updates, completion events, submissions, evaluations, certificates, and related progress records. Use filters to locate recent feedback, confirm that a unit was recorded as complete, or review project activity.

Practice Projects and Assessments

  • First boot and desktop exploration: boot Raspberry Pi OS, complete initial configuration, open the terminal, and confirm the system works.
  • System update: run the package update commands and explain why updates should be applied before project development.
  • Remote connection: find the Pi's local IP address and connect through SSH from another computer.
  • Python hello world: create and run a script, then modify it to accept input or repeat output in a loop.
  • Blink an LED: wire an LED with a current-limiting resistor and write a program that changes its output state.
  • Button-controlled LED: read a button input, configure a pull resistor, and control an LED from the button state.
  • Environmental monitor: connect a supported I2C sensor, read values in Python, and record or display measurements.
  • Simple automation: combine a sensor, program logic, and an LED, buzzer, or suitable relay module while documenting electrical safety.

For each submission, include the board model, operating-system version, parts list, power arrangement, wiring diagram, pin-numbering convention, code, dependencies, test results, and known limitations. This documentation is part of reliable engineering, not an optional extra.

Key Exam and Review Notes

  • A Raspberry Pi is a single-board computer; an Arduino is generally a microcontroller board.
  • Raspberry Pi GPIO uses 3.3 V logic. A 5 V signal can damage a GPIO input.
  • Physical pin numbers and BCM GPIO identifiers are not interchangeable.
  • An LED requires a series current-limiting resistor.
  • GPIO pins should not directly drive motors or other high-current loads.
  • Inputs need a defined state, commonly provided by a pull-up or pull-down resistor.
  • All parts in a low-voltage circuit normally need a shared ground reference.
  • SSH is secure remote terminal access, and an IP address identifies a device on the network.
  • Use sudo apt update before sudo apt full-upgrade to refresh package information before upgrading.
  • Shut down Linux before removing power to reduce filesystem and microSD corruption.
  • Test power, software, and each hardware component incrementally before combining them.

After completing this course, continue with related study in Linux fundamentals, Python programming, networking, physical computing, electronics prototyping, sensors, robotics, and home automation.