Stufin
Home Quick Cart Profile

Raspberry Pi4 Model B 2GB Ultimate Kit with Pi4 2GB, Case, Power Adapter, Heatsink, Fan, 32GB SD Card, Sensors, Manual, HDMI and Ethernet Cable

Buy Now

Pin Configuration

  • Raspberry Pi 4 Model B 2GB Ultimate Kit Pinout Documentation
  • The Raspberry Pi 4 Model B 2GB is a powerful single-board computer that offers a wide range of features and capabilities for IoT and industrial applications. This documentation provides a detailed explanation of the pins on the Raspberry Pi 4 Model B 2GB, along with guidance on how to connect them.
  • GPIO Pins (Header J8)
  • The GPIO (General Purpose Input/Output) pins on the Raspberry Pi 4 Model B 2GB are used to connect various peripherals and devices. Here's a breakdown of each pin:
  • 1. Pin 1: 3V3 Power - Provides a 3.3V power output.
  • 2. Pin 2: 5V Power - Provides a 5V power output.
  • 3. Pin 3: GPIO 2 - A general-purpose digital input/output pin.
  • 4. Pin 4: 5V Power - Provides a 5V power output.
  • 5. Pin 5: GPIO 3 - A general-purpose digital input/output pin.
  • 6. Pin 6: Ground - A ground connection.
  • 7. Pin 7: GPIO 4 - A general-purpose digital input/output pin.
  • 8. Pin 8: TXD - The transmit data pin for serial communication (UART).
  • 9. Pin 9: GPIO 5 - A general-purpose digital input/output pin.
  • 10. Pin 10: RXD - The receive data pin for serial communication (UART).
  • 11. Pin 11: GPIO 6 - A general-purpose digital input/output pin.
  • 12. Pin 12: PWM0 - A pulse-width modulation output pin.
  • 13. Pin 13: GPIO 7 - A general-purpose digital input/output pin.
  • 14. Pin 14: TXD - The transmit data pin for serial communication (UART).
  • 15. Pin 15: GPIO 8 - A general-purpose digital input/output pin.
  • 16. Pin 16: GPIO 9 - A general-purpose digital input/output pin.
  • 17. Pin 17: 3V3 Power - Provides a 3.3V power output.
  • 18. Pin 18: GPIO 10 - A general-purpose digital input/output pin.
  • 19. Pin 19: MISO - The master in, slave out pin for SPI communication.
  • 20. Pin 20: GPIO 11 - A general-purpose digital input/output pin.
  • 21. Pin 21: MOSI - The master out, slave in pin for SPI communication.
  • 22. Pin 22: GPIO 12 - A general-purpose digital input/output pin.
  • 23. Pin 23: SCL - The clock pin for I2C communication.
  • 24. Pin 24: GPIO 13 - A general-purpose digital input/output pin.
  • 25. Pin 25: SDA - The data pin for I2C communication.
  • 26. Pin 26: GPIO 14 - A general-purpose digital input/output pin.
  • 27. Pin 27: GPIO 15 - A general-purpose digital input/output pin.
  • 28. Pin 28: GPIO 16 - A general-purpose digital input/output pin.
  • 29. Pin 29: GPIO 17 - A general-purpose digital input/output pin.
  • 30. Pin 30: GPIO 18 - A general-purpose digital input/output pin.
  • 31. Pin 31: GPIO 19 - A general-purpose digital input/output pin.
  • 32. Pin 32: GPIO 20 - A general-purpose digital input/output pin.
  • 33. Pin 33: GPIO 21 - A general-purpose digital input/output pin.
  • 34. Pin 34: Ground - A ground connection.
  • 35. Pin 35: GPIO 22 - A general-purpose digital input/output pin.
  • 36. Pin 36: GPIO 23 - A general-purpose digital input/output pin.
  • 37. Pin 37: GPIO 24 - A general-purpose digital input/output pin.
  • 38. Pin 38: GPIO 25 - A general-purpose digital input/output pin.
  • 39. Pin 39: Ground - A ground connection.
  • 40. Pin 40: GPIO 26 - A general-purpose digital input/output pin.
  • Power and Ground Pins
  • Pin 1, 17: 3V3 Power - Provides a 3.3V power output.
  • Pin 2, 4, 14: 5V Power - Provides a 5V power output.
  • Pin 6, 9, 34, 39: Ground - A ground connection.
  • UART Pins
  • Pin 8: TXD - The transmit data pin for serial communication (UART).
  • Pin 10: RXD - The receive data pin for serial communication (UART).
  • Pin 14: TXD - The transmit data pin for serial communication (UART).
  • SPI Pins
  • Pin 19: MISO - The master in, slave out pin for SPI communication.
  • Pin 21: MOSI - The master out, slave in pin for SPI communication.
  • Pin 23: SCL - The clock pin for SPI communication.
  • Pin 24: SDA - The data pin for SPI communication.
  • I2C Pins
  • Pin 23: SCL - The clock pin for I2C communication.
  • Pin 25: SDA - The data pin for I2C communication.
  • Connecting the Pins
  • When connecting the pins, make sure to:
  • Use a suitable connector or breadboard to connect devices to the GPIO pins.
  • Ensure proper voltage and current ratings for power connections.
  • Use a serial console or terminal emulator to access the UART interface.
  • Use an SPI or I2C interface library to communicate with devices connected to the SPI or I2C pins.
  • Consult the Raspberry Pi documentation and datasheets for specific pin usage and configuration.
  • Remember to always handle the Raspberry Pi 4 Model B 2GB with care, as it is a sensitive electronic device.

Code Examples

Raspberry Pi 4 Model B 2GB Ultimate Kit Documentation
The Raspberry Pi 4 Model B 2GB Ultimate Kit is a comprehensive bundle that includes the Raspberry Pi 4 Model B 2GB single-board computer, a protective case, power adapter, heatsink, fan, 32GB SD card, sensors, manual, HDMI cable, and Ethernet cable. This kit provides everything needed to get started with IoT projects, robotics, and other applications.
Hardware Components:
Raspberry Pi 4 Model B 2GB:
	+ Quad-core Cortex-A72 CPU (1.5GHz)
	+ 2GB RAM
	+ Dual-band 802.11ac wireless networking
	+ Bluetooth 5.0
	+ Gigabit Ethernet
	+ 2 x USB 3.0, 2 x USB 2.0
	+ HDMI 2.0a
	+ MicroSD card slot
 Protective Case:
	+ Durable plastic design
	+ Access to all ports and features
 Power Adapter:
	+ 5V, 3A output
	+ Supports Raspberry Pi 4's power requirements
 Heatsink:
	+ Effective heat dissipation for the Raspberry Pi 4
 Fan:
	+ Active cooling for high-performance applications
 32GB SD Card:
	+ Pre-installed with Raspbian OS (latest version)
	+ Ample storage for projects and data
 Sensors:
	+ Various sensors included (e.g., temperature, humidity, motion)
	+ Can be used for environmental monitoring, automation, and more
 Manual:
	+ Detailed guide for getting started with the Raspberry Pi 4
	+ Tutorials and projects to help you learn
 HDMI and Ethernet Cables:
	+ High-quality cables for connecting displays and networks
Software Examples:
### Example 1: Temperature Monitoring with Python
Using the included temperature sensor, this example demonstrates how to read temperature data and display it on the console.
Code:
```python
import time
import os
# Import the necessary libraries
import RPi.GPIO as GPIO
import Adafruit_DHT
# Set up the GPIO library
GPIO.setmode(GPIO.BCM)
# Define the temperature sensor pin
DHT_PIN = 4
# Set up the temperature sensor
dht_sensor = Adafruit_DHT.DHT11
while True:
    # Read the temperature data
    humidity, temperature = Adafruit_DHT.read_retry(dht_sensor, DHT_PIN)
# Print the temperature data
    print("Temperature: {:.1f}C".format(temperature))
# Wait for 1 second before taking the next reading
    time.sleep(1)
```
Output:
```
Temperature: 22.5C
Temperature: 22.6C
Temperature: 22.5C
...
```
### Example 2: Remote Video Streaming with Python and OpenCV
Using the Raspberry Pi 4's camera interface and OpenCV, this example demonstrates how to capture and stream video remotely over the network.
Code:
```python
import cv2
import numpy as np
import socket
# Set up the camera
cap = cv2.VideoCapture(0)
# Set up the socket for streaming
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(("0.0.0.0", 8080))
sock.listen(1)
print("Waiting for connection...")
conn, addr = sock.accept()
print("Connected by", addr)
while True:
    # Capture a frame from the camera
    ret, frame = cap.read()
# Encode the frame as JPEG
    ret, jpg = cv2.imencode(".jpg", frame)
# Send the encoded frame over the socket
    conn.send(jpg.tobytes())
# Check for quitting
    if cv2.waitKey(1) & 0xFF == ord("q"):
        break
# Release the camera and socket
cap.release()
conn.close()
```
Output:
```
Waiting for connection...
Connected by ('192.168.1.100', 52812)
```
Note: In this example, you would need to connect to the Raspberry Pi's IP address and port 8080 using a video streaming client (e.g., VLC) to view the remote video stream.
These examples demonstrate the versatility of the Raspberry Pi 4 Model B 2GB Ultimate Kit in IoT and robotics projects. With its powerful processor, abundant storage, and comprehensive bundle of accessories, this kit provides everything needed to get started with innovative projects.