The Raspberry Pi 4 Model B is a compact, affordable single-board computer designed for a wide range of applications. It features a powerful quad-core processor, up to 8GB of RAM, multiple USB ports, dual micro-HDMI outputs, and Ethernet connectivity. This versatile device is ideal for projects such as programming, media centers, IoT applications, robotics, and more. Its small form factor and robust performance make it a popular choice for both hobbyists and professionals.
Common applications include:
Specification | Details |
---|---|
Processor | Broadcom BCM2711, Quad-core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz |
RAM Options | 2GB, 4GB, or 8GB LPDDR4-3200 SDRAM |
USB Ports | 2x USB 3.0, 2x USB 2.0 |
Video Output | 2x micro-HDMI ports, up to 4K resolution |
Ethernet | Gigabit Ethernet |
Wireless Connectivity | Dual-band 802.11ac Wi-Fi, Bluetooth 5.0 |
GPIO Pins | 40-pin GPIO header |
Storage | microSD card slot |
Power Supply | 5V/3A via USB-C |
Dimensions | 85.6mm x 56.5mm x 17mm |
The Raspberry Pi 4 Model B features a 40-pin GPIO (General Purpose Input/Output) header. Below is a table summarizing the pin configuration:
Pin Number | Pin Name | Functionality |
---|---|---|
1 | 3.3V Power | Power supply |
2 | 5V Power | Power supply |
3 | GPIO2 (SDA1) | I2C Data |
4 | 5V Power | Power supply |
5 | GPIO3 (SCL1) | I2C Clock |
6 | Ground | Ground |
7 | GPIO4 | General-purpose I/O |
8 | GPIO14 (TXD0) | UART Transmit |
9 | Ground | Ground |
10 | GPIO15 (RXD0) | UART Receive |
... | ... | ... |
39 | Ground | Ground |
40 | GPIO21 | General-purpose I/O |
For a complete GPIO pinout, refer to the official Raspberry Pi documentation.
The Raspberry Pi 4 Model B can control an LED using its GPIO pins. Below is an example Python script using the RPi.GPIO
library:
import RPi.GPIO as GPIO import time
GPIO.setmode(GPIO.BCM)
LED_PIN = 18
GPIO.setup(LED_PIN, GPIO.OUT)
try: while True: GPIO.output(LED_PIN, GPIO.HIGH) # Turn on the LED time.sleep(1) # Wait for 1 second GPIO.output(LED_PIN, GPIO.LOW) # Turn off the LED time.sleep(1) # Wait for 1 second except KeyboardInterrupt: # Clean up GPIO settings on exit GPIO.cleanup()
**Steps to Run the Code**:
1. Connect an LED to GPIO18 (pin 12) with a 330-ohm resistor in series.
2. Save the script as `blink.py` on the Raspberry Pi.
3. Run the script using `python3 blink.py`.
The Raspberry Pi does not boot:
Overheating:
GPIO pins not working:
RPi.GPIO
library is installed (pip install RPi.GPIO
).No display on the monitor:
Can I power the Raspberry Pi 4 Model B via GPIO pins? Yes, you can power the board using the 5V and GND pins, but this bypasses the onboard power management and is not recommended.
What operating systems are compatible with the Raspberry Pi 4 Model B? The Raspberry Pi supports Raspberry Pi OS, Ubuntu, and other Linux-based distributions. Some lightweight versions of Windows (e.g., Windows IoT Core) are also supported.
Can I use the Raspberry Pi 4 Model B for gaming? Yes, it can run retro gaming emulators like RetroPie or Recalbox, but it is not suitable for modern PC gaming.