🔐 Login
📝 Sign Up
🔑 Forgot Password

Welcome Back!

Enter your credentials to continue

Create Account

Join our secure network

Recovery

Reset your password via email

Raspberry Pi Original Overview

The original Raspberry Pi, launched in 2012, was the first model in the Raspberry Pi series. Designed to promote computer science education, it provided an affordable, compact, and low-power computing platform.

Key Specifications
  • Processor: Broadcom BCM2835, 700 MHz ARM11
  • RAM: 256MB (later upgraded to 512MB in Model B rev 2)
  • Storage: SD card slot
  • Video Output: HDMI, Composite RCA
  • USB Ports: 2 × USB 2.0
  • Networking: 10/100 Ethernet (Model B only)
  • GPIO: 26-pin header
  • Power: 5V micro-USB
Raspberry Pi 1 Model B
Raspberry Pi 1 Model B board top view

Image: Harrison Fornasier / Wikimedia Commons, CC BY‑SA 4.0

More info: Raspberry Pi 1 Model B – Official Site

Raspberry Pi 1 Model B+
Raspberry Pi 1 Model B+ top view

Image: Lucasbosch / Wikimedia Commons, CC BY‑SA

More info: Raspberry Pi 1 Model B+ – Official Site

Operating System

The original Raspberry Pi runs a variety of Linux distributions, with Raspbian (now called Raspberry Pi OS) being the most popular. Other compatible OS options include:

  • Raspbian (Debian-based)
  • Arch Linux ARM
  • Pidora (Fedora-based)
  • OpenELEC (for media center use)
Legacy and Impact

The original Raspberry Pi paved the way for modern single-board computers (SBCs) and has been widely used in education, DIY projects, robotics, and embedded applications. Its low cost and flexibility have made it a popular choice among hobbyists and developers worldwide.

Related Links
Original Raspberry Pi Compute Module Overview

The Raspberry Pi Compute Module is designed for embedded and industrial applications, offering the processing power of the original Raspberry Pi Model B in a more compact and flexible form. It is specifically developed for users who require a small form factor and need to integrate the Raspberry Pi’s capabilities into custom hardware or larger systems.

Key Specifications
  • Processor: Broadcom BCM2835 (ARM1176JZF-S @ 700 MHz, Single-core)
  • RAM: 512MB DDR2 SDRAM
  • Storage: 4GB eMMC flash memory (removable)
  • Networking: No built-in networking; via carrier board
  • USB: No direct USB ports; via carrier board
  • Video Output: HDMI, via carrier board
  • GPIO: 200-pin board-to-board connector
  • Power: 5V DC (through carrier board)
Raspberry Pi Compute Module 1

Raspberry Pi Compute Module 1

Key Features
  • Compact size: only a 200-pin SODIMM connector
  • Flexible I/O via 200-pin connector
  • Customizable for embedded systems
  • Affordable alternative to standard Raspberry Pi
Applications
  • Embedded systems: robotics, industrial controllers, IoT
  • Automation: industrial control systems, smart appliances
  • Prototyping: design custom circuits and interfaces
Carrier Board Options
  • No onboard USB or HDMI; provided via carrier board
  • Popular boards: Raspberry Pi Compute Module IO Board, third-party industrial boards
  • Carrier boards offer Ethernet, USB, GPIO, and video outputs
How to Get Started
  • Purchase Compute Module + compatible carrier board
  • Connect module to carrier board following guidelines
  • Flash desired OS (Raspbian, Linux) to microSD/eMMC
  • Configure system via SSH or terminal access
Related Links
I2C on Raspberry Pi

Overview

I2C (Inter-Integrated Circuit) is a popular communication protocol for connecting low-speed devices like sensors, displays, and EEPROMs. The Raspberry Pi provides native support for I2C communication, which can be easily enabled and used for a variety of projects.

Enabling I2C on Raspberry Pi

To use I2C on the Raspberry Pi, you'll first need to enable it in the Raspberry Pi's configuration settings. Follow these steps:

  • Open the terminal on your Raspberry Pi and run: sudo raspi-config.
  • Navigate to Interfacing Options > I2C and enable it.
  • Reboot your Raspberry Pi for the changes to take effect.

Once I2C is enabled, you can use the i2c-tools package to interact with I2C devices. To install it, run:

sudo apt-get install i2c-tools
Connecting I2C Devices

Raspberry Pi has two I2C bus interfaces available. The default I2C bus is typically on the GPIO pins 3 (SDA) and 5 (SCL). Connect any I2C-enabled device to these pins, ensuring correct voltage levels and pull-up resistors.

  • SDA (Data) - GPIO Pin 3
  • SCL (Clock) - GPIO Pin 5
  • GND - Ground

After connecting an I2C device, detect it with:

sudo i2cdetect -y 1

This will show a map of I2C devices connected to your Raspberry Pi.

Using I2C with Python

To communicate with I2C devices, you can use Python libraries such as smbus. Here's an example of how to use I2C with Python to read data from an I2C sensor:

import smbus
bus = smbus.SMBus(1)  # Initialize I2C bus 1
address = 0x48        # I2C address of the device

# Reading a byte from a register (example)
data = bus.read_byte_data(address, 0x00)
print(data)
I²S (Inter-IC Sound) on Raspberry Pi

I²S is a synchronous digital audio interface used to connect external DACs, ADCs, and audio codecs. On Raspberry Pi, I²S is provided by the SoC PCM peripheral and is routed to the GPIO header for external use.

Raspberry Pi Models with External I²S
  • Raspberry Pi Zero / Zero W / Zero 2 W
  • Raspberry Pi 1 Model A+ / B+
  • Raspberry Pi 2 Model B
  • Raspberry Pi 3 Model B / B+
  • Raspberry Pi 4 Model B
  • Raspberry Pi 5
  • Compute Module 1 / 3 / 3+ / 4 (via carrier board)
I²S GPIO Pins (40-pin Header)

The following GPIO pins are used for I²S on Raspberry Pi:

  • GPIO18 (Pin 12) — Bit Clock (BCLK / PCM_CLK)
  • GPIO19 (Pin 35) — Word Select (LRCLK / PCM_FS)
  • GPIO20 (Pin 38) — Data In (DIN)
  • GPIO21 (Pin 40) — Data Out (DOUT)

Ground can be taken from any GND pin (e.g. Pin 6).

Enabling I²S in Raspberry Pi OS

Edit /boot/config.txt and add the following lines:


# Disable onboard analog audio
dtparam=audio=off

# Enable I2S / PCM interface
dtparam=i2s=on

# Optional: load an I2S DAC overlay
# dtoverlay=hifiberry-dac
      

Reboot after saving. The I²S device will then be available via ALSA.

SPI on Raspberry Pi

SPI (Serial Peripheral Interface) is a high-speed communication protocol used for connecting peripherals like sensors, displays, and memory chips. Raspberry Pi supports SPI communication for fast data transfer.

Enabling SPI on Raspberry Pi

To enable SPI, activate it through the Raspberry Pi configuration settings:

  • Open the terminal and run: sudo raspi-config.
  • Navigate to Interfacing Options > SPI and enable it.
  • Reboot your Raspberry Pi for the settings to take effect.

Check if SPI is enabled by running:

lsmod | grep spi
SPI Pinout

SPI communication on the Raspberry Pi uses the following pins:

  • CE0 (Chip Enable) - GPIO Pin 8
  • CE1 (Chip Enable) - GPIO Pin 7
  • CLK (Clock) - GPIO Pin 11
  • MISO (Master In Slave Out) - GPIO Pin 9
  • MOSI (Master Out Slave In) - GPIO Pin 10
  • GND - Ground
Using SPI with Python

The spidev library in Python allows communication with SPI devices. Example usage:


import spidev

spi = spidev.SpiDev()
spi.open(0, 0)  # Open SPI bus 0, device 0
spi.max_speed_hz = 50000  # Set the clock speed

# Send and receive data
response = spi.xfer2([0x01, 0x02, 0x03])
print(response)
        
Timers & PWM on Raspberry Pi

Raspberry Pi supports hardware timers and Pulse Width Modulation (PWM), essential for controlling motors, LEDs, and other components that require precise timing or signal modulation.

Timers on Raspberry Pi

The Raspberry Pi has multiple timers for precise time management, accessible via Python libraries like RPi.GPIO or pigpio. They are useful for scheduling tasks or triggering events at regular intervals.

Common uses include:

  • Generating periodic interrupts.
  • Running time-sensitive tasks like data logging or event-based actions.

PWM on Raspberry Pi

Pulse Width Modulation (PWM) allows control of power to devices like LEDs and motors. Raspberry Pi supports PWM on several GPIO pins.

  • Use RPi.GPIO to configure a GPIO pin for PWM.
  • Set the frequency of the PWM signal.
  • Adjust the duty cycle to control power output.

Example: Generate PWM with Python


import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)

pwm = GPIO.PWM(18, 1000)  # Pin 18, frequency 1 kHz
pwm.start(50)  # 50% duty cycle

# Change duty cycle after 5 seconds
pwm.ChangeDutyCycle(75)
      
Serial Communication on Raspberry Pi

Serial communication allows the Raspberry Pi to communicate with other devices like sensors, modules, and microcontrollers over a serial link. It is commonly used for debugging, interfacing with peripherals, or controlling other systems.

Enabling Serial on Raspberry Pi

By default, the serial interface on the Raspberry Pi is disabled. To enable it:

  • Open the terminal and run: sudo raspi-config.
  • Navigate to Interfacing Options > Serial and disable the shell interface, but enable the serial port hardware.
  • Reboot your Raspberry Pi.
Using Serial with Python

The pyserial library is commonly used for serial communication in Python. Install it using:

sudo apt-get install python3-serial

Example of using serial communication:


import serial

ser = serial.Serial('/dev/ttyAMA0', 9600)  # Open serial port at 9600 baud rate

# Write to serial
ser.write(b'Hello, Raspberry Pi!')

# Read from serial
data = ser.readline()
print(data)
        
GPIO (General Purpose Input/Output) on Raspberry Pi

The GPIO pins on the Raspberry Pi provide a versatile interface for connecting sensors, actuators, and other external components. With up to 40 GPIO pins available on various models, you can interact with the physical world, controlling LEDs, motors, buttons, and more.

The GPIO pins are connected to the Broadcom SoC and can be configured in software for digital input, digital output, PWM, and communication protocols such as I2C and SPI.

Configuring GPIO Pins
  • Use the RPi.GPIO Python library to configure GPIO pins for input or output.
  • Use the gpiozero Python library for higher-level control with simplified syntax.
Example Code to Blink an LED

import RPi.GPIO as GPIO
import time

GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)

while True:
    GPIO.output(17, GPIO.HIGH)
    time.sleep(1)
    GPIO.output(17, GPIO.LOW)
    time.sleep(1)
        
GPIO Interrupts on Raspberry Pi — Overview

Interrupts are a powerful feature of Raspberry Pi's GPIO (General Purpose Input/Output) pins, allowing the Pi to react to events such as changes in input signals. Interrupts enable efficient event handling, letting the Pi act only when needed instead of polling continuously.

What are GPIO Interrupts?

A GPIO interrupt occurs when a GPIO pin changes state. When the trigger condition is met, the Raspberry Pi executes an ISR (interrupt service routine), allowing immediate reaction without wasting CPU time polling.

GPIO Interrupt Types
  • Rising Edge: LOW → HIGH transition
  • Falling Edge: HIGH → LOW transition
  • Both Edges: triggers on any change
  • Level Change: requires software handling
Setting Up GPIO Interrupts

Interrupts require configuring a GPIO pin as input, selecting the interrupt edge type, and defining an ISR to handle the event.

Step-by-Step Setup

  1. Install WiringPi or RPi.GPIO.
  2. Configure the GPIO pin as input.
  3. Specify the interrupt type (rising, falling, or both).
  4. Write the ISR callback.
  5. Enable the interrupt listener.
Python Example Code

Example using RPi.GPIO to configure an interrupt on GPIO 17:


import RPi.GPIO as GPIO
import time

# Set the GPIO mode
GPIO.setmode(GPIO.BCM)

# Define the pin to listen for interrupts
pin = 17

# Setup the pin as an input with a pull-up resistor
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Define the callback function that will be triggered by the interrupt
def gpio_callback(channel):
    print("Interrupt detected on GPIO pin", channel)

# Add an interrupt to GPIO pin 17, looking for a rising edge
GPIO.add_event_detect(pin, GPIO.RISING, callback=gpio_callback)

# Keep the program running to listen for interrupts
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    print("Program terminated")
finally:
    GPIO.cleanup()
        
Using Interrupts for Debouncing

Mechanical switches can generate multiple false triggers. Debouncing prevents this by enforcing a delay between valid events.

Debouncing Example


import RPi.GPIO as GPIO
import time

# Set the GPIO mode
GPIO.setmode(GPIO.BCM)

# Define the pin for the button
button_pin = 17

# Setup the button pin as an input with a pull-up resistor
GPIO.setup(button_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Define a debounce delay (in seconds)
debounce_delay = 0.2

# Define the callback function with debounce
def gpio_callback(channel):
    print("Button pressed!")
    time.sleep(debounce_delay)

# Add an event detection on the button pin with a falling edge (button press)
GPIO.add_event_detect(button_pin, GPIO.FALLING, callback=gpio_callback, bouncetime=int(debounce_delay * 1000))

# Keep the program running to listen for interrupts
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    print("Program terminated")
finally:
    GPIO.cleanup()
        
Using Multiple GPIO Interrupts

Multiple pins can be configured to trigger interrupts independently.

Example for Multiple GPIO Interrupts


import RPi.GPIO as GPIO
import time

# Set the GPIO mode
GPIO.setmode(GPIO.BCM)

# Define pins for input
pin1 = 17
pin2 = 18

# Setup the pins as inputs with pull-up resistors
GPIO.setup(pin1, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(pin2, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Define the callback function for pin interrupts
def gpio_callback(channel):
    print(f"Interrupt detected on GPIO pin {channel}")

# Add events for multiple pins
GPIO.add_event_detect(pin1, GPIO.RISING, callback=gpio_callback)
GPIO.add_event_detect(pin2, GPIO.RISING, callback=gpio_callback)

# Keep the program running to listen for interrupts
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    print("Program terminated")
finally:
    GPIO.cleanup()
        
GPIO Interrupt Limitations
  • Interrupt Handling Time: CPU load can delay ISR execution.
  • Number of Interrupts: Limited hardware interrupt lines.
  • Timing Accuracy: Not real-time precise; use MCU for hard-timing applications.
Conclusion

GPIO interrupts allow Raspberry Pi to respond instantly to external events, making them essential for buttons, sensors, and real-time signalling applications.

Camera Support on Raspberry Pi Models

The Raspberry Pi models support various camera modules through the CSI (Camera Serial Interface) port. Below is a description of the camera compatibility for each model.

Raspberry Pi Zero

The Raspberry Pi Zero supports the official Raspberry Pi camera modules through its CSI interface. The camera can be connected using a small ribbon cable. The Zero uses a mini version of the standard CSI connector found on other models.

  • Camera Port: CSI connector (smaller than the standard connector).
  • Camera Compatibility: Official Raspberry Pi Camera Module V1, V2, and HQ Camera.
  • Maximum Resolution: Up to 12MP (HQ Camera).
Raspberry Pi Model B (Original)

The original Raspberry Pi Model B (rev 1 and rev 2) supports the CSI interface for connecting a camera. It was the first model to introduce camera support.

  • Camera Port: Full-size CSI connector (standard 15-pin).
  • Camera Compatibility: Official Raspberry Pi Camera Module V1 and V2.
  • Maximum Resolution: Up to 8MP (Camera Module V2).
Raspberry Pi 2 Model B

The Raspberry Pi 2 Model B also supports the CSI interface, similar to the original Model B, but with improved processing power.

  • Camera Port: Full-size CSI connector (standard 15-pin).
  • Camera Compatibility: Official Raspberry Pi Camera Module V1, V2, and HQ Camera.
  • Maximum Resolution: Up to 12MP (HQ Camera).
Raspberry Pi 3 Model B and B+

The Raspberry Pi 3 Model B and B+ continue to support the CSI interface, and the improved performance allows higher frame rates and more advanced camera uses.

  • Camera Port: Full-size CSI connector (standard 15-pin).
  • Camera Compatibility: Official Camera Module V1, V2, HQ, and supported third-party cameras.
  • Maximum Resolution: Up to 12MP (HQ Camera).
Raspberry Pi 4 Model B

The Raspberry Pi 4 Model B supports the CSI interface and is ideal for high-performance camera projects.

  • Camera Port: Full-size CSI connector (standard 15-pin).
  • Camera Compatibility: Official Camera Module V1, V2, HQ, and some third-party options.
  • Maximum Resolution: Up to 12MP (HQ Camera).
  • Video Capabilities: 4K output via HDMI; suitable for high-definition camera applications.
Raspberry Pi 5 (Upcoming)

The Raspberry Pi 5 is expected to continue supporting the CSI camera interface with possible improvements.

  • Camera Port: Full-size CSI (or improved high-throughput variant).
  • Camera Compatibility: Expected support for Camera Module V1, V2, HQ, and others.
  • Maximum Resolution: Likely 12MP or higher.
  • Video Capabilities: Possibly improved 4K handling.
Camera Software and Commands

All models support the raspistill and raspivid tools for image and video capture.

  • Capture an Image (still photo):
    raspistill -o image.jpg
    This captures an image as "image.jpg".
  • Record Video:
    raspivid -o video.h264 -t 10000
    This records a 10-second video.
  • Enable Camera Module:
    sudo raspi-config
    Enable the camera in “Interface Options”.
Video Connectors (Non-HDMI) on Raspberry Pi Models

Raspberry Pi models support video output through various interfaces, including composite video and the CSI camera interface. HDMI is most common, but alternative outputs exist for legacy or specialized setups.

Raspberry Pi Zero

The Raspberry Pi Zero does not have a native composite video jack. Video output is via HDMI or GPIO pins with an external adapter.

  • Video Output: HDMI (micro-HDMI adapter) or GPIO (requires adapter).
  • Composite Video: Not available natively.
Raspberry Pi Model B (Original)

The original Raspberry Pi Model B (rev 1 and 2) includes a 3.5mm jack for analog audio and RCA socket for composite video.

  • Video Output: Composite RCA.
  • Audio Output: 3.5mm analog stereo.
Raspberry Pi 2 Model B

The Raspberry Pi 2 Model B retains the 3.5mm jack for composite video and analog audio, like the original Model B.

  • Video Output: Composite via 3.5mm jack (shared with audio).
  • Audio Output: 3.5mm analog stereo (shared with composite video).
Raspberry Pi 3 Model B and B+

The Raspberry Pi 3 Model B and B+ maintain the 3.5mm jack for composite video/audio alongside HDMI support.

  • Video Output: Composite via 3.5mm jack (shared with audio).
  • Audio Output: 3.5mm analog stereo (shared with composite video).
Raspberry Pi 4 Model B

The Raspberry Pi 4 Model B has a 3.5mm jack for composite video/audio, alongside HDMI for 4K digital output.

  • Video Output: Composite via 3.5mm jack (shared with audio).
  • Audio Output: 3.5mm analog stereo (shared with composite video).
Raspberry Pi 5 (Upcoming)

The Raspberry Pi 5 is expected to continue offering the 3.5mm jack for composite video/audio alongside HDMI digital output.

  • Video Output: Composite via 3.5mm jack (shared with audio).
  • Audio Output: 3.5mm analog stereo (shared with composite video).
Audio Connectors on Raspberry Pi Models

Raspberry Pi models with audio output support 3.5mm audio jacks or HDMI audio through adapters. The audio connectors vary depending on the model, with some models featuring a dedicated audio jack, while others rely on HDMI or other digital interfaces.

Raspberry Pi Zero

The Raspberry Pi Zero does not have a dedicated 3.5mm audio jack. Audio is available through the HDMI interface or via a GPIO pin using a DAC HAT or external module.

  • Audio Output: HDMI or GPIO (requires DAC HAT).
  • Analog Audio: Not available natively.
Raspberry Pi Model B (Original)

The Raspberry Pi Model B (rev 1 and rev 2) features a 3.5mm audio jack for analog audio output. It supports both audio and composite video output through this jack.

  • Audio Output: 3.5mm audio jack (analog audio and composite video).
  • Supported Formats: Analog stereo output (3.5mm jack).
Raspberry Pi 2 Model B

The Raspberry Pi 2 Model B features a 3.5mm audio jack for analog output along with composite video. HDMI provides digital audio output as well.

  • Audio Output: 3.5mm audio jack (analog) and HDMI (digital audio).
  • Supported Formats: Analog stereo and HDMI digital audio.
Raspberry Pi 3 Model B and B+

The Raspberry Pi 3 Model B and B+ continue to offer the 3.5mm audio jack for analog audio, alongside HDMI digital audio output. Improved processing power allows better handling of digital audio.

  • Audio Output: 3.5mm audio jack (analog) and HDMI (digital audio).
  • Supported Formats: Analog stereo and HDMI digital audio.
Raspberry Pi 4 Model B

The Raspberry Pi 4 Model B includes a 3.5mm audio jack for analog output and digital audio via HDMI. Audio quality is improved, supporting better digital audio output.

  • Audio Output: 3.5mm audio jack (analog) and HDMI (digital audio).
  • Supported Formats: Analog stereo and HDMI digital audio.
Raspberry Pi 5 (Upcoming)

The Raspberry Pi 5 is expected to provide a 3.5mm audio jack for analog output and digital audio via HDMI, with potential improvements in quality and formats.

  • Audio Output: 3.5mm audio jack (analog) and HDMI (digital audio).
  • Supported Formats: Analog stereo and HDMI digital audio.
USB on Raspberry Pi

The Raspberry Pi features multiple USB ports for connecting peripherals such as keyboards, mice, storage devices, and network adapters. The USB interface provides both data transfer and power to connected devices.

USB Versions

Different Raspberry Pi models support various USB versions. Most have USB 2.0 ports, while newer models like Raspberry Pi 4 and Raspberry Pi 400 offer USB 3.0 for faster data transfer.

  • USB 2.0: Data transfer speeds up to 480 Mbps.
  • USB 3.0: Data transfer speeds up to 5 Gbps (Raspberry Pi 4 and 400).
Power Supply via USB

Some Raspberry Pi models can power external devices through USB ports, such as keyboards, mice, or small external drives. High-power devices may require an external power source.

USB OTG (On-The-Go)

On micro-USB models (Pi Zero, Pi 3), the USB port supports OTG, allowing the Pi to act as a host or a device. Useful for creating USB gadgets or connecting the Pi to a smartphone or PC.

Configuring USB Devices

Plug the USB device into a Raspberry Pi port. Common devices work out of the box; specialized peripherals may require drivers or tools.

Example: Using a USB WiFi Adapter

Plug the USB WiFi adapter into a port and install required drivers (usually included in Raspberry Pi OS):


sudo apt-get update
sudo apt-get install firmware-ralink
        
USB Troubleshooting

If a USB device is not working:

  • Ensure the device is properly connected.
  • Check the device's power requirements.
  • Use dmesg to check system logs for USB errors.
Useful USB Commands
  • lsusb: Lists all connected USB devices.
  • dmesg | grep usb: Displays detailed USB logs.
Operating Systems on Raspberry Pi

Overview

Raspberry Pi supports a wide range of operating systems, including Linux distributions, Android, Ultibo, and various real-time operating systems (RTOS). This guide covers installation on SD cards for Raspberry Pi with instructions for Windows and Linux hosts.

Installing Linux on Raspberry Pi

Windows Host

  1. Download the Raspberry Pi Imager from the official website.
  2. Install the Imager on your Windows PC.
  3. Insert the SD card (8GB or larger) into your computer.
  4. Launch Raspberry Pi Imager.
  5. Select the desired OS (e.g., Raspberry Pi OS or Ubuntu).
  6. Select your SD card as the target.
  7. Click "Write" to install the OS.
  8. Once complete, safely eject the SD card and insert it into the Raspberry Pi.

Linux Host

  1. Install Raspberry Pi Imager:
    sudo apt install rpi-imager
  2. Insert the SD card into your Linux computer.
  3. Launch the Imager:
    rpi-imager
  4. Select the desired OS.
  5. Choose the SD card as the target.
  6. Click "Write" to install the OS.
  7. Once complete, safely eject the SD card and insert it into the Raspberry Pi.
Installing Android on Raspberry Pi

Android allows Raspberry Pi to run Android apps. Installation uses a prebuilt image file and works on both Windows and Linux hosts.

  1. Download a compatible Android image from sources like KonstaKANG or AndroidPi.
  2. Use Balena Etcher or Raspberry Pi Imager to write the image to the SD card.
  3. Insert the SD card into the Raspberry Pi.
  4. Power on the Pi to boot into Android and follow the setup instructions.
Installing Ultibo on Raspberry Pi

Overview

Ultibo is a bare-metal OS for Raspberry Pi, allowing programs to be written in Pascal with direct hardware access. It provides real-time performance and is ideal for embedded systems.

Steps to Install Ultibo

  1. Download the Ultibo image from the official Ultibo website.
  2. Write the image to the SD card using Balena Etcher or Raspberry Pi Imager.
  3. Install the Ultibo Pascal IDE on your host computer (Windows, macOS, Linux).
  4. Develop and compile your Pascal program in the Ultibo IDE.
  5. Transfer the compiled binary to the SD card.
  6. Insert the SD card into the Raspberry Pi and power it on; your program will run directly on the hardware.

Examples of Projects

  • GPIO control for sensors and actuators.
  • Embedded systems with real-time constraints.
  • Real-time data processing from sensors.
  • Custom display drivers for LCD or OLED screens.
Other Real-Time Operating Systems

Overview

Several real-time operating systems (RTOS) are available for Raspberry Pi, providing precise timing, fast response, and low-latency performance for embedded or IoT applications.

Popular RTOS for Raspberry Pi

  • FreeRTOS: Widely used for real-time embedded applications. Supports low-latency tasks and microcontroller-like operations.
  • ChibiOS: Lightweight RTOS with small footprint, suitable for embedded systems.
  • RIOT OS: Low-power RTOS designed for IoT devices, supporting real-time applications on Raspberry Pi.
Raspberry Pi 1, 2, 3 Ethernet

These early Raspberry Pi models feature 10/100 Mbps Ethernet via a USB 2.0–connected LAN controller. Throughput is typically limited to around 90 Mbps due to the USB bus bottleneck.

Note: Performance is limited by USB 2.0; heavy network loads may saturate CPU usage.

Raspberry Pi 3 B+ Ethernet

The Pi 3 B+ offers Gigabit Ethernet hardware but limited via USB 2.0, providing practical throughput up to ~300 Mbps.

Note: Despite Gigabit capability on paper, USB 2.0 limits actual throughput.

Raspberry Pi 4, 400, CM4, CM5 Ethernet

These modern models feature true Gigabit Ethernet via a dedicated PHY. This allows full-speed wired connectivity (~940 Mbps practical) without USB bottleneck.

Note: True Gigabit Ethernet is supported; use Cat5e/Cat6 cabling to achieve maximum throughput.

Useful Ethernet Commands

Independent command blocks for managing Raspberry Pi Ethernet interfaces. Click to copy to clipboard.


# List all network interfaces
ip link show
# or
ifconfig -a
      

# Show IP address of Ethernet interface eth0
ip addr show eth0
      

# Show Ethernet link speed
sudo ethtool eth0 | grep Speed
      

# Enable DHCP on eth0
sudo dhclient eth0
      

# Edit dhcpcd.conf to assign static IP
sudo nano /etc/dhcpcd.conf
# Add lines:
# interface eth0
# static ip_address=192.168.1.100/24
# Restart networking service
sudo systemctl restart dhcpcd
      

# Bring interface up
sudo ifconfig eth0 up
# Bring interface down
sudo ifconfig eth0 down
      

# Show interface statistics
ifconfig eth0
# Or RX/TX byte counters
cat /sys/class/net/eth0/statistics/rx_bytes
cat /sys/class/net/eth0/statistics/tx_bytes