Introduction to Raspberry Pi
• The Raspberry Pi is a low-cost, credit-card-sized computer developed by the
Raspberry Pi Foundation in the UK. Its purpose is to promote the teaching of basic
computer science in schools and developing countries. It is widely used in IoT,
robotics, automation, and AI projects. Various models include Raspberry Pi Zero,
3B+, 4, and Pico. Compared to microcontrollers such as Arduino, Raspberry Pi is a
complete mini-computer with OS support.
Raspberry Pi Board: Hardware
Layout and Pinouts
• Key components on the board: Broadcom SoC (CPU + GPU), RAM, HDMI port, USB
ports, Ethernet, Camera interface (CSI), Display interface (DSI), microSD slot, audio
jack, and 40-pin GPIO header. The GPIO header includes power pins (3.3V, 5V),
ground pins, general-purpose I/O pins, and communication interfaces (I2C, SPI,
UART).
Operating Systems on Raspberry Pi
• The default operating system is Raspberry Pi OS (formerly Raspbian). Other
supported OS include Ubuntu, Windows 10 IoT Core, RetroPie (gaming), LibreELEC
(media center), and Kali Linux (security). OS installation is done using Raspberry Pi
Imager or Balena Etcher. The boot process begins from the microSD card which
contains the OS.
Configuring Raspberry Pi
• Steps: Insert microSD card, connect power, HDMI display, keyboard, and mouse.
During first boot, configure language, region, Wi-Fi, and password. Update the
system with 'sudo apt update && sudo apt upgrade'. Enable interfaces such as
SSH, I2C, SPI, Camera via 'raspi-config' utility.
Programming Raspberry Pi
• The Raspberry Pi supports multiple programming languages including Python, C,
C++, Java, and [Link]. Python is most popular for GPIO access. Example program:
blinking an LED using the [Link] library. Other projects include controlling
sensors, motors, and displays.
Connecting Raspberry Pi via SSH
• SSH allows remote terminal access. Enable SSH through 'raspi-config'. Connect
from another computer using 'ssh pi@<IP_address>'. Default login: username 'pi'
and password 'raspberry' (should be changed for security).
Remote Access Tools
• Remote access can be achieved through VNC Viewer (desktop access), PuTTY
(Windows SSH client), MobaXterm, Termius, or Xrdp for RDP protocol. SSH is text-
based while VNC and RDP provide full graphical access.
Interfacing DHT Sensor with
Raspberry Pi
• The DHT11/DHT22 sensors measure temperature and humidity. Connect data pin
to GPIO and use Python libraries such as Adafruit_DHT to read values. Example
program prints temperature in Celsius and humidity percentage.
Raspberry Pi as Webserver
• Raspberry Pi can host a webserver using Apache, Nginx, or lightweight frameworks
like Flask. Example: A Flask app displaying 'Hello, Raspberry Pi Webserver!'
accessible at [Link]
Raspberry Pi Camera
• The Pi Camera connects via CSI port. Enable using 'raspi-config'. Capture images
with 'raspistill -o [Link]' and record video with 'raspivid -o video.h264 -t 10000'.
Python 'picamera' library allows programmatic control.
Image & Video Processing using Pi
• Install OpenCV for advanced image and video processing. Example: capturing
frames from Pi camera and converting to grayscale in real-time. Applications
include face detection, object tracking, and computer vision projects.