Broadcom BCM2835 SoC, 1GHz single-core CPU
Broadcom BCM2835 SoC, 1GHz single-core CPU
512MB
MicroSD card slot
802.11 b/g/n Wi-Fi, Bluetooth 4.0
40-pin, pre-soldered
1080p30 H.264 video encoding and decoding
Approximately 0.5W
65mm x 30mm
9g
0C to 50C
Conclusion
The Raspberry Pi Zero WH with Pre-Soldered Header is a powerful, compact, and affordable computing solution for a wide range of applications. Its small size, low power consumption, and wireless connectivity make it an ideal choice for IoT projects, robotics, home automation, and more. With its ease of use and extensive community support, the Raspberry Pi Zero WH is an excellent platform for both technical professionals and informed hobbyists.
Raspberry Pi Zero WH with Pre-Soldered HeaderThe Raspberry Pi Zero WH is a tiny, low-cost, and highly capable single-board computer (SBC) that is ideal for IoT projects, robotics, and embedded systems. The pre-soldered header on this variant makes it easy to connect peripherals andExpansion boards.Technical Specifications:Processor: Broadcom BCM2835, quad-core Cortex-A7 CPU
RAM: 512 MB
Storage: MicroSD card slot
Networking: 802.11 b/g/n wireless LAN, Bluetooth 4.0
GPIO: 40-pin header (pre-soldered)
Operating System: Raspberry Pi OS (based on Linux)Code Examples:### Example 1: Blinking LED using PythonThis example demonstrates how to use the Raspberry Pi Zero WH's GPIO pins to control an LED.Hardware Requirements:Raspberry Pi Zero WH
Breadboard
LED
220 resistor
Jumper wiresSoftware Requirements:Raspberry Pi OS
Python 3.xCode:
```python
import RPi.GPIO as GPIO
import time# Set up GPIO mode
GPIO.setmode(GPIO.BCM)# Set up LED pin as output
led_pin = 17
GPIO.setup(led_pin, GPIO.OUT)try:
while True:
# Turn LED on
GPIO.output(led_pin, GPIO.HIGH)
time.sleep(1)
# Turn LED off
GPIO.output(led_pin, GPIO.LOW)
time.sleep(1)
except KeyboardInterrupt:
# Clean up GPIO on exit
GPIO.cleanup()
```
Explanation:In this example, we use the RPi.GPIO library to control the LED connected to GPIO pin 17. We set up the pin as an output and use a while loop to toggle the LED on and off.### Example 2: Reading Temperature and Humidity using DHT11 Sensor and PythonThis example demonstrates how to use the Raspberry Pi Zero WH to read temperature and humidity data from a DHT11 sensor.Hardware Requirements:Raspberry Pi Zero WH
DHT11 sensor
Breadboard
Jumper wiresSoftware Requirements:Raspberry Pi OS
Python 3.x
DHT11 library (install using `pip install dht11`)Code:
```python
import dht11# Initialize DHT11 sensor on GPIO pin 4
dht_sensor = dht11.DHT11(pin=4)try:
while True:
# Read temperature and humidity data
result = dht_sensor.read()
if result.is_valid():
print(f"Temperature: {result.temperature}C")
print(f"Humidity: {result.humidity}%")
else:
print("Error: Failed to read data from sensor")
time.sleep(2)
except KeyboardInterrupt:
pass
```
Explanation:In this example, we use the DHT11 library to read temperature and humidity data from the DHT11 sensor connected to GPIO pin 4. We create a DHT11 object, specify the pin, and use the `read()` method to retrieve the data. We then print the temperature and humidity values to the console.These examples demonstrate the versatility and ease of use of the Raspberry Pi Zero WH with pre-soldered header. With its compact size and low cost, this board is ideal for a wide range of IoT applications.