85mm x 56mm x 17mm (3.34in x 2.22in x 0.67in)
85mm x 56mm x 17mm (3.34in x 2.22in x 0.67in)
Approximately 45g (1.59oz)
Thermal Dissipation
The Raspberry Pi 4 Model B has a built-in heat spreader to dissipate heat generated by the SoC. In addition, the board's design allows for easy attachment of heat sinks or fans for further thermal management.
Compliance and Safety
The Raspberry Pi 4 Model B complies with relevant safety and regulatory standards, including CE, FCC, and RoHS.
Warranty and Support
The Raspberry Pi 4 Model B is supported by the Raspberry Pi Foundation, which provides extensive documentation, community support, and a 12-month warranty.
Conclusion
The Raspberry Pi 4 Model B (2GB RAM) is a powerful, feature-rich, and affordable SBC ideal for IoT projects, robotics, and embedded systems. Its compact size, low power consumption, and versatility make it an excellent choice for a wide range of applications.
Raspberry Pi 4 Model B (2GB RAM) DocumentationOverviewThe Raspberry Pi 4 Model B is a single-board computer that offers a powerful and affordable solution for various IoT projects. This model features 2GB of RAM, making it suitable for applications that require more memory. The Raspberry Pi 4 Model B is equipped with a quad-core Cortex-A72 CPU, Gigabit Ethernet, Wi-Fi, Bluetooth 5.0, and multiple USB ports.Hardware SpecificationsCPU: Quad-core Cortex-A72 (ARMv8) 64-bit
RAM: 2GB LPDDR4-2400
Storage: MicroSD card slot
Operating System: Raspberry Pi OS (formerly Raspbian)
Networking: Gigabit Ethernet, 802.11ac Wi-Fi, Bluetooth 5.0
USB: 2x USB 3.0, 2x USB 2.0
Video: 2x HDMI 2.0, 4Kp60 H.265 decode
Audio: 3.5mm analog audio jackProgramming LanguagesThe Raspberry Pi 4 Model B supports various programming languages, including:Python
Java
C++
ScratchCode Examples### Example 1: Python Script for LED BlinkingIn this example, we will use the Raspberry Pi's GPIO pins to blink an LED.Hardware Requirements:Raspberry Pi 4 Model B
Breadboard
LED
1k resistor
Jumper wiresCode:
```python
import RPi.GPIO as GPIO
import time# Set up GPIO mode
GPIO.setmode(GPIO.BCM)# Define the LED pin
LED_PIN = 17# Set up the LED pin as an output
GPIO.setup(LED_PIN, GPIO.OUT)while True:
# Turn on the LED
GPIO.output(LED_PIN, GPIO.HIGH)
time.sleep(1)
# Turn off the LED
GPIO.output(LED_PIN, GPIO.LOW)
time.sleep(1)
```
Explanation:We import the `RPi.GPIO` module, which provides an interface to the Raspberry Pi's GPIO pins.
We set up the GPIO mode to use the Broadcom numbering scheme.
We define the LED pin as GPIO 17.
We set up the LED pin as an output.
In the main loop, we toggle the LED on and off using the `GPIO.output()` function.### Example 2: Python Script for Temperature and Humidity Reading using DHT11 SensorIn this example, we will use the Raspberry Pi to read temperature and humidity values from a DHT11 sensor.Hardware Requirements:Raspberry Pi 4 Model B
DHT11 temperature and humidity sensor
Breadboard
Jumper wiresCode:
```python
import Adafruit_DHT
import time# Set up the DHT11 sensor
DHT_SENSOR = Adafruit_DHT.DHT11# Define the pin connected to the DHT11 sensor
DHT_PIN = 17while True:
# Read the temperature and humidity values
humidity, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)
# Print the values
print("Temperature: {:.1f}C Humidity: {:.1f}%".format(temperature, humidity))
# Wait for 1 second before taking the next reading
time.sleep(1)
```
Explanation:We import the `Adafruit_DHT` module, which provides an interface to the DHT11 sensor.
We set up the DHT11 sensor as a DHT11 type.
We define the pin connected to the DHT11 sensor as GPIO 17.
In the main loop, we read the temperature and humidity values using the `Adafruit_DHT.read_retry()` function.
We print the values to the console.
We wait for 1 second before taking the next reading using the `time.sleep()` function.Note: These code examples are just a starting point, and you may need to modify them to suit your specific project requirements. Additionally, ensure that you have installed the necessary libraries and dependencies before running the code.