The Raspberry Pi 4B 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 Gigabit Ethernet connectivity. This versatile device is ideal for projects such as programming, robotics, IoT systems, media centers, and more. Its small form factor and robust performance make it a popular choice for both hobbyists and professionals.
Common applications of the Raspberry Pi 4B include:
The Raspberry Pi 4B offers impressive hardware capabilities for its size and price. Below are its key technical details:
Feature | Specification |
---|---|
Processor | Broadcom BCM2711, Quad-core Cortex-A72 (ARM v8) |
Clock Speed | 1.5 GHz |
RAM Options | 2GB, 4GB, or 8GB LPDDR4 |
GPU | VideoCore VI, OpenGL ES 3.0 support |
Storage | MicroSD card slot |
Connectivity | Gigabit Ethernet, Wi-Fi 802.11ac, Bluetooth 5.0 |
USB Ports | 2x USB 3.0, 2x USB 2.0 |
Video Output | 2x micro-HDMI (4K@60Hz support) |
Power Supply | 5V/3A via USB-C |
GPIO Pins | 40-pin header |
Dimensions | 85.6mm x 56.5mm x 17mm |
The Raspberry Pi 4B features a 40-pin GPIO header for interfacing with external components. Below is a summary of the pin configuration:
Pin Number | Pin Name | Functionality |
---|---|---|
1 | 3.3V Power | Power supply (3.3V) |
2 | 5V Power | Power supply (5V) |
3 | GPIO2 (SDA1) | I2C Data |
4 | 5V Power | Power supply (5V) |
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 |
... | ... | ... (Refer to official pinout) |
For a complete GPIO pinout, refer to the official Raspberry Pi documentation.
The Raspberry Pi 4B can interface with an Arduino UNO via GPIO pins. Below is an example of how to send data from the Raspberry Pi to the Arduino using UART:
import serial
import time
arduino = serial.Serial('/dev/ttyS0', 9600, timeout=1) time.sleep(2) # Wait for the connection to establish
arduino.write(b'Hello Arduino!\n') # Send a message as bytes print("Message sent to Arduino.")
arduino.close()
void setup() {
Serial.begin(9600); // Initialize serial communication
}
void loop() {
if (Serial.available() > 0) { // Check if data is available
String message = Serial.readString(); // Read the incoming message
Serial.println("Received: " + message); // Echo the message back
}
}
By following this documentation, you can effectively set up and use the Raspberry Pi 4B for a variety of projects.