Raspberry Pi 15W Official Black Power Supply (EU) Documentation
The Raspberry Pi 15W Official Black Power Supply (EU) is a high-quality, reliable power supply designed specifically for the Raspberry Pi series of single-board computers. This power supply provides a stable 15W of power, making it suitable for demanding applications that require a consistent power source.
Input Voltage: 100-240V AC
Output Voltage: 5.1V DC
Output Current: 2.5A
Power Rating: 15W
Output Connector: Micro-USB
Certifications: CE, FCC, and RoHS compliant
Dimensions: 75 x 45 x 25mm
Weight: 130g
Here are a few examples of how to use the Raspberry Pi 15W Official Black Power Supply (EU) in various contexts:
Example 1: Basic Raspberry Pi Setup
In this example, we will demonstrate how to power a Raspberry Pi 4 Model B using the Raspberry Pi 15W Official Black Power Supply (EU).
```python
# No code required, simply plug in the power supply to the Raspberry Pi's micro-USB port
```
Example 2: Python Script to Monitor Power Supply Voltage
In this example, we will demonstrate how to use the Raspberry Pi's built-in `vcgencmd` command to monitor the power supply voltage and print it to the console.
```python
import subprocess
while True:
voltage = subprocess.check_output(['vcgencmd', 'get_volts'])
print(f"Power supply voltage: {voltage.decode('utf-8').strip()} V")
```
Example 3: Autonomous Robotics Project
In this example, we will demonstrate how to use the Raspberry Pi 15W Official Black Power Supply (EU) to power a Raspberry Pi 4 Model B in an autonomous robotics project. The Raspberry Pi will be used to control a robot's movements and sensors.
```python
import RPi.GPIO as GPIO
import time
# Initialize GPIO library
GPIO.setmode(GPIO.BCM)
# Define motor control pins
motor_left_forward = 17
motor_left_backward = 23
motor_right_forward = 24
motor_right_backward = 25
# Set up motor control pins as output
GPIO.setup(motor_left_forward, GPIO.OUT)
GPIO.setup(motor_left_backward, GPIO.OUT)
GPIO.setup(motor_right_forward, GPIO.OUT)
GPIO.setup(motor_right_backward, GPIO.OUT)
while True:
# Read sensor data and control motors accordingly
# ...
GPIO.output(motor_left_forward, GPIO.HIGH)
GPIO.output(motor_right_forward, GPIO.HIGH)
time.sleep(1)
GPIO.output(motor_left_forward, GPIO.LOW)
GPIO.output(motor_right_forward, GPIO.LOW)
time.sleep(1)
```
These examples demonstrate the ease of use and flexibility of the Raspberry Pi 15W Official Black Power Supply (EU) in various IoT projects.