Raspberry Pi 4 Model B 4GB Ultimate Kit Documentation
The Raspberry Pi 4 Model B 4GB Ultimate Kit is a comprehensive bundle that includes the Raspberry Pi 4 Model B single-board computer, a case, power adapter, heatsink, 32GB SD card, manual, HDMI cable, and Ethernet cable. This kit provides everything needed to get started with Raspberry Pi development.
Raspberry Pi 4 Model B 4GB single-board computer
Case for Raspberry Pi 4 Model B
Power adapter (5V, 3A)
Heatsink for Raspberry Pi 4 Model B
32GB SD card (preloaded with Raspberry Pi OS)
Manual
HDMI cable
Ethernet cable
Raspberry Pi 4 Model B:
+ Processor: Broadcom BCM2711B0 quad-core Cortex-A72 (ARM v8) 64-bit SoC
+ RAM: 4GB LPDDR4-2400 SDRAM
+ Storage: microSD card slot (supporting up to 2TB)
+ Operating System: Raspberry Pi OS (preloaded on 32GB SD card)
+ Connectivity: 2x USB 3.0, 2x USB 2.0, 1x HDMI, 1x Ethernet (10/100/1000 Mbps)
+ GPIO: 40-pin header with GPIO, I2C, SPI, UART, and power supply pins
### Example 1: Python Script for GPIO LED Blinking
This example demonstrates how to use the Raspberry Pi's GPIO pins to control an LED. You'll need:
1x LED
1x 220 resistor
1x Breadboard
Jumper wires
Connect the LED to GPIO pin 17 and the resistor to GND.
Code:
```python
import RPi.GPIO as GPIO
import time
# Set up GPIO mode
GPIO.setmode(GPIO.BCM)
# Set up GPIO pin 17 as output
GPIO.setup(17, GPIO.OUT)
while True:
# Turn on the LED
GPIO.output(17, GPIO.HIGH)
time.sleep(1)
# Turn off the LED
GPIO.output(17, GPIO.LOW)
time.sleep(1)
```
Explanation:
This script uses the RPi.GPIO library to set up GPIO pin 17 as an output. It then enters an infinite loop, toggling the LED on and off every second using the `GPIO.output()` function.
### Example 2: Python Script for Reading Temperature and Humidity using DHT11 Sensor
This example demonstrates how to use the Raspberry Pi to read temperature and humidity values from a DHT11 sensor. You'll need:
1x DHT11 sensor
1x Breadboard
Jumper wires
Connect the DHT11 sensor to the Raspberry Pi's GPIO pins (VCC to 3.3V, GND to GND, and OUT to GPIO 23).
Code:
```python
import Adafruit_DHT
import time
# Set up DHT11 sensor
DHT_SENSOR = Adafruit_DHT.DHT11
DHT_PIN = 23
while True:
# Read temperature and humidity values
humidity, temperature = Adafruit_DHT.read_retry(DHT_SENSOR, DHT_PIN)
# Print the values
print(f"Temperature: {temperature:.2f}C, Humidity: {humidity:.2f}%")
time.sleep(2)
```
Explanation:
This script uses the Adafruit_DHT library to read temperature and humidity values from the DHT11 sensor. It then prints the values to the console every 2 seconds.
Raspberry Pi Official Documentation: <https://www.raspberrypi.org/documentation/>
Raspberry Pi GitHub Repository: <https://github.com/raspberrypi>
Adafruit DHT11 Library: <https://github.com/adafruit/Adafruit_DHT>
I hope this helps! Let me know if you have any questions.