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.

  1. Download the Raspberry Pi Imager tool from the official Raspberry Pi website to your computer.
  2. Insert your micro SD card into your computer using a card reader.
  3. 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").
  1. Click CHOOSE STORAGE and select your SD card.
  2. Click WRITE. This will erase the card and install the OS. Wait for the process to finish.
  3. 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.

  1. 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`).

  1. Run the install command: Copy and paste this single line into the terminal:

curl -sSL https://install.pi-hole.net | bash

  1. 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).
  2. 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.
  3. 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.
  4. 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.

  1. Flash the RetroPie image as described in Step 1.
  2. 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.
  3. 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.
  1. 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.
  1. 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.
  2. 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.

  1. Flash Home Assistant OS as described in Step 1.
  2. 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`.
  3. Create an account: Follow the on-screen wizard to create a user and set up your home location.
  4. 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.
  5. 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.
  1. 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

  1. Use a quality SD card. Cheap cards cause corruption and random crashes. Spend the extra few dollars for a known brand.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

Frequently Asked Questions

Pi-hole isn't blocking ads on YouTube. Why?
A: YouTube serves ads from the same domain as the video content. Pi-hole cannot block these without also breaking the video player. For YouTube ad blocking, you need a browser extension like uBlock Origin.
My Bluetooth controller has input lag. What can I do?
A: First, try switching your phone or other devices to the 2.4 GHz Wi-Fi band, as Bluetooth uses the same frequency. Alternatively, use a wired USB controller or a 5 GHz Wi-Fi dongle for your Pi to free up the Bluetooth radio.
Home Assistant isn't discovering my smart plugs.
A: You likely need to enable Multicast or IGMP Snooping on your router. Log into your router's advanced settings and look for these options. Also, check the "Integrations" page in Home Assistant to see if your brand is supported.
Can I run all three of these on one Pi?
A: Technically yes, but it's not recommended for beginners. You would need to run them as Docker containers on a single Raspberry Pi 4 or 5 with at least 4GB of RAM. For a first build, it’s much easier to dedicate one Pi to one project.
This article is based on content from YouTube. View original source →