Chapter 1: Familiarise Yourself with Your Raspberry Pi

The Raspberry Pi is a compact marvel: a complete computer encapsulated in an affordable, pocket-sized form. Whether you're keen on surfing the internet, playing games, coding, or experimenting with circuits, the Raspberry Pi and its vibrant community are ready to guide you.

Described as a single-board computer, the Raspberry Pi offers all the functions of standard computers — desktops, laptops, or smartphones — but is neatly integrated onto one circuit board. While its size is akin to a credit card, it's capable of performing tasks just like its larger counterparts, albeit at varying speeds.

Emerging from the desire to boost practical computer education, the Raspberry Pi Foundation, a non-profit organisation, launched this venture. The initial few thousand units in 2012 were an instant hit, leading to millions being distributed globally since. These devices now feature in homes, schools, offices, and even in innovative projects like autonomous boats and space-bound balloons.

Over time, several Raspberry Pi models have been introduced, each enhancing specific features or catering to distinct applications. For instance, the Raspberry Pi Zero is a more compact variant which, for its smaller footprint, compromises on some features like multiple USB ports. However, all models share a unifying trait: compatibility. Software developed for one Raspberry Pi version can seamlessly run on another, even allowing the latest operating system to function on prototype models, albeit slower.

This book primarily focuses on the Raspberry Pi 5Raspberry Pi 4 Model B and Raspberry Pi 400 — some of the most advanced in the series. However, the insights gained can be applied across the Raspberry Pi spectrum, ensuring relevance even if you possess a different model.

A guided tour of Raspberry Pi

In contrast to conventional computers concealed within cases, the typical Raspberry Pi proudly showcases all its components and ports. While optional cases are available for added protection, its exposed design is ideal for understanding computer parts and efficiently connecting necessary add-ons, known as peripherals.

 The parts of the Raspberry Pi 5

  1. USB Type-C power in
  2. Dual Camera and Display Ports
  3. WiFi/Bluetooth
  4. HDMI 0
  5. HDMI 1
  6. System-on-chip
  7. GPIO Pins
  8. RAM
  9. PCIe Port
  10. PoE Header
  11. USB 3.0 Ports
  12. USB 2.0 Ports
  13. Ethernet Port
  14. RP1 I/O Chip
  15. Fan Connector
  16. Power Button
  17. Heatsink Mounts 

Components on the Raspberry Pi

Similar to other computers, the Raspberry Pi consists of multiple components, each crucial for its operation. The most vital of these is located slightly above the board's centre, protected by a metal cap: this is the system-on-chip (SoC).

Raspberry Pi 5 System on Chip (BCM2712)

The term 'system-on-chip' aptly describes its contents: beneath that metal cover lies a silicon chip or integrated circuit. This chip houses the Raspberry Pi's core components, such as the central processing unit (CPU)—often termed the computer's 'brain'—and the graphics processing unit (GPU) responsible for visuals.

However, a computer's 'brain' requires memory to function effectively. Above the SoC, there's a distinct chip resembling a tiny black square.

Raspberry Pi 5 RAM

This represents the Raspberry Pi's random access memory (RAM). When you engage with the Raspberry Pi, this RAM retains your actions. Only upon saving will data transfer to the microSD card. These elements represent the Raspberry Pi's two types of memory: the temporary RAM, which erases its data upon shutdown, and the persistent microSD card, which retains its stored information.

 In the top right corner of the board, there's another protective metal cover. Beneath this lid is the radio component, empowering the Raspberry Pi with wireless communication capabilities.

Raspberry Pi WiFi and Bluetooth Module 

This radio serves a dual purpose: as a WiFi module for network connections and as a Bluetooth transmitter for interfacing with peripherals like mice or for data exchange with nearby smart devices, including sensors and smartphones.

Not every Raspberry Pi comes with built-in wireless capabilities. For instance, some Raspberry Pi Zero lacks this feature. While you can purchase compatible WiFi modules for Raspberry Pis, you might require USB cables to adapt from USB-A to microUSB.

Another chip encapsulated in a sleek black plastic sheath is the RP1. The RP1 is Raspberry Pi's newest marvel. Custom-crafted as an advanced silicon I/O controller for the Raspberry Pi 5, this petite powerhouse, occupying a mere 20mm² die, seamlessly merges analogue and digital functionalities.

Raspberry Pi RP1 Chip

From accommodating MIPI camera inputs and USB integrations to featuring analogue video outputs and a plethora of general-purpose I/O pins, the RP1 is a testament to the Raspberry Pi team's innovation, demonstrating their evolving prowess in tailoring distinct silicon components to their exacting standards.

Ports on the Raspberry Pi 5

The Raspberry Pi boasts a variety of ports, with four distinct Universal Serial Bus (USB) ports located centrally and towards the right on the bottom edge. These ports cater to a myriad of USB-compatible devices, ranging from keyboards and mice to digital cameras and flash drives.

Raspberry Pi 5 USB Ports

To differentiate, the ports with black interiors are USB 2.0, adhering to the second version of the USB standard, while those with blue interiors are the swifter USB 3.0, conforming to the more recent third version. Don't worry about running out of USB ports, you can use a USB hub to increase the number of usable USB ports.

Adjacent to the USB ports, on the left, lies an Ethernet port, often referred to as a network port. This port facilitates the connection of the Raspberry Pi to a wired computer network using an ethernet cable equipped with an RJ45 connector. Upon close inspection of the Ethernet port, you'll notice two LEDs at its base. These status LEDs serve as indicators, confirming the active and functional connection.