Introduction
In todayβs guide (Day-27), weβll walk through the complete process of setting up your own IoT-based pet feeder using a Raspberry Pi. Our goal is to automate the feeding process using a servo motor, Python, and scheduled cron jobs.
π― Objective
Set up a Raspberry Pi-powered automated pet feeder that runs a Python script to control a servo motor β scheduled to feed your cat daily.
π Table of Contents (Day-27)
- πΎ Flashing Raspberry Pi OS to SD Card
- π Enabling SSH Access
- πΆ (Optional) Configure Wi-Fi for Headless Boot
- π Booting the Raspberry Pi
- π Detecting Raspberry Pi on Local Network
- π Attempting SSH Access
- π§ Verifying SSH Setup Again
- π₯οΈ Tried Accessing via Hostname
- π Diagnosis
- β Final Status (Day-27 Recap)
π± Step-by-Step Setup Guide
1. Flashing Raspberry Pi OS to SD Card
- Download Raspberry Pi OS (Lite) from the official website.
- Use Raspberry Pi Imager or Balena Etcher to flash it to a microSD card (32GB in our case).
Tool Used: Raspberry Pi Imager
Card Size: 32GB microSD
Status : β
OS flashed and verified
2. Enabling SSH Access
Inserted SD card into MacBook β Mounted as:
Created the SSH file in boot partition:
β SSH enabled successfully for headless access.
3. (Optional) Configure Wi-Fi for Headless Boot
Created wpa_supplicant.conf inside the boot partition (optional if using Ethernet):
π‘ Replaced with real credentials, saved and ejected the SD card.
4. Booting the Raspberry Pi
- Inserted the SD card into Raspberry Pi
- Powered on via USB-C
- Waited ~2 minutes for the OS to boot
β Expected: Pi should connect to local network (via Wi-Fi or Ethernet)
5. Detecting Raspberry Pi on Local Network
Ran a network scan and see the π₯οΈ Output (Filtered):
6. Attempting SSH Access
Tried to connect But β Error:
7. Verifying SSH Setup Again
- Reinserted SD card into Mac
- Confirmed
sshfile still exists in/Volumes/bootfs - Reinserted back into Pi and rebooted
Still, SSH failed. Possibly:
- SSH service didnβt start properly
- Raspberry Pi didnβt boot fully
- Network issue
8. Tried Accessing via Hostname
But β Error:
π 9.Diagnosis:
-
.localresolution via mDNS might be missing on Mac - Or Raspberry Pi never fully booted
π 10. Final Status (Day-27 Recap)
| Task | Status |
|---|---|
| SD Card flashed | β Done |
| SSH file added | β Done |
| Wi-Fi config (optional) | β Skipped or Done |
| Booted Pi | β Boot attempted |
Detected IP via nmap
|
β Partial |
| SSH connection established | β Failed |
Hostname access (.local) |
β Failed |
| Next: Servo wiring + script | π Pending |
π Coming Up: Day-28
In the next post, weβll troubleshoot Raspberry Pi SSH issues step-by-step, verify if the OS is booting correctly, and check if the SSH service is running. Once resolved, weβll test the Python servo script and complete our cat feeder automation.
#30DaysLinuxChallenge #CloudWhisler
#DevOps #Linux #RHCSA #Opensource #AWS #CloudComputing
Catch out by My LinkedIn profile
https://www.linkedin.com/in/rajpreet-gill-4569b4161/








Top comments (0)