What You'll Need
Here is a DIY tutorial based on the provided transcript, written in the requested format.
# 3 Awesome Weekend Projects for Your Raspberry Pi
Got a Raspberry Pi gathering dust? Let’s fix that. This guide walks you through three specific builds: a network-wide ad blocker, a retro gaming console, and a smart home brain. Each project is designed to be completed in a weekend afternoon.
- Raspberry Pi: A Pi 3, 3B+, 4, or 5 is recommended. The Pi Zero 2W can work for some tasks but is slower.
- Micro SD Card: A quality 32GB or larger card (e.g., SanDisk Extreme or Samsung EVO). Speed matters here.
- Power Supply: An official 5.1V 3A USB-C (for Pi 4/5) or micro-USB (for Pi 3) power adapter.
- Network Connection: An Ethernet cable is highly recommended for stability, especially for Pi-hole and Home Assistant. Wi-Fi works but can be less reliable.
- Router Login: You need the admin username and password for your home router (usually found on a sticker on the router itself).
- Optional but Recommended: A small heatsink and fan kit to keep the Pi cool during heavy use.
- For Gaming: A Bluetooth controller (e.g., PS4, Xbox One, or 8BitDo).
- For Home Assistant: Smart lights, plugs, or sensors (e.g., Philips Hue, TP-Link Kasa, or Zigbee devices).
Step-by-Step Guide
Step 1: Flash the Operating System
This is the foundation for all three projects.
- Download the Raspberry Pi Imager tool from the official Raspberry Pi website to your computer.
- Insert your micro SD card into your computer using a card reader.
- Open the Raspberry Pi Imager. Click CHOOSE OS.
- For Pi-hole: Select Raspberry Pi OS (32-bit).
- For Retro Gaming: Select RetroPie or Recalbox (these are found under "Emulation and game OS").
- For Home Assistant: Select Home Assistant OS (found under "Other specific-purpose OS").
- Click CHOOSE STORAGE and select your SD card.
- Click WRITE. This will erase the card and install the OS. Wait for the process to finish.
- Eject the SD card, insert it into your Pi, and plug in the power. Let the Pi boot up completely once before proceeding.
Step 2: Install Pi-hole (Network-Wide Ad Blocker)
This blocks ads on every device in your home, including smart TVs and phones.
- Connect to your Pi: Open a terminal on your computer and SSH into your Pi. If you don't know the IP, check your router's device list.
ssh pi@raspberrypi.local
(Default password is `raspberry`).
- Run the install command: Copy and paste this single line into the terminal:
curl -sSL https://install.pi-hole.net | bash
- Follow the on-screen prompts: The installer will ask you to choose a network interface (choose `eth0` if using Ethernet) and an upstream DNS provider (Google or Cloudflare are good defaults).
- Set a Static IP: After installation, the installer will show you the Pi's IP address. Write this down. You must set this as a static IP on your router. Log into your router's admin panel, find "DHCP Reservation" or "Static IP," and assign the Pi's MAC address to this IP.
- Point your router to Pi-hole: In your router's admin panel, find the DNS settings (usually under WAN or Internet). Change the primary DNS to your Pi's static IP. Set the secondary DNS to `0.0.0.0` or your Pi's IP again.
- Test it: On your phone, turn off Wi-Fi and turn it back on. Go to `http://pi.hole/admin` to see the dashboard. Browse the web on any device—ads should be gone.
Step 3: Build the Retro Gaming Console
Turn your Pi into a classic arcade machine.
- Flash the RetroPie image as described in Step 1.
- Boot and configure: Plug in an HDMI cable to your TV and a USB keyboard. The first boot will expand the filesystem and then reboot.
- Pair a Bluetooth controller:
- Press F4 to exit to the terminal.
- Run `sudo bluetoothctl`.
- Put your controller in pairing mode.
- Run `scan on`, find your device's MAC address, then run `pair [MAC address]`.
- Run `trust [MAC address]` and then `connect [MAC address]`.
- Type `exit` and then `emulationstation` to return to the menu.
- Add ROMs (Games):
- Via USB: Format a USB stick as FAT32. Create a folder called `retropie` on it. Insert it into the Pi. Wait 30 seconds, then remove it. Plug it back into your computer. You'll now see ROM folders (e.g., `nes`, `snes`, `megadrive`). Copy your legally obtained ROM files into the correct folders.
- Via Wi-Fi: From your computer, open a file browser and type `\\retropie` (Windows) or connect via SMB (Mac/Linux). Drag and drop ROMs into the appropriate folders.
- Scrape Artwork: From the main RetroPie menu, go to SCRAPER. Select your systems and choose a source (like Screenscraper). This automatically downloads box art and descriptions for your games.
- Configure Shaders: While in a game, press Select + X to open the RetroArch menu. Go to Quick Menu > Shaders and choose a preset like `crt-lottes` for a classic CRT TV look.
Step 4: Create a Smart Home Brain with Home Assistant
Automate your lights, plugs, and sensors.
- Flash Home Assistant OS as described in Step 1.
- Boot and access: Plug the SD card into the Pi and power it on. Wait 5-10 minutes. On your computer, go to `http://homeassistant.local:8123`.
- Create an account: Follow the on-screen wizard to create a user and set up your home location.
- Discover devices: Home Assistant will automatically scan your network for compatible devices (Philips Hue, TP-Link Kasa, Google Cast, etc.). Click CONFIGURE for any devices it finds.
- Create a basic automation:
- Go to Settings > Automations & Scenes > Create Automation.
- Choose Create New Automation.
- For the Trigger, select Sun > Sunset.
- For the Action, select Call Service > Light.Turn On.
- Choose your porch light. Click Save.
- Add presence detection:
- Go to Settings > Devices & Services > Integrations.
- Search for "Mobile App" and install it on your phone. Follow the pairing instructions. Home Assistant can now see if you're home based on your phone's location.
Tips for Success
- Use a quality SD card. Cheap cards cause corruption and random crashes. Spend the extra few dollars for a known brand.
- Update firmware first. Before installing any software, run `sudo apt update && sudo apt upgrade -y` (for Pi-hole/RetroPie) or check for updates in the Home Assistant settings. This prevents weird bugs.
- Keep it cool. For RetroPie (which uses the GPU heavily) and Home Assistant (which runs 24/7), a small heatsink and fan are not optional—they are required to prevent thermal throttling.
- Use Ethernet for network tasks. Wi-Fi introduces latency and packet loss. For Pi-hole and Home Assistant, a wired connection is significantly more reliable.
- Back up your SD card. After you have everything configured, shut down the Pi, pull the SD card, and create a full disk image using a tool like Win32 Disk Imager or BalenaEtcher. If the card fails, you can restore everything in minutes.