Raspberry PI AI: Hello World! Meet ToddSnap
I wanted to dabble with the latest and greatest buzzword in the IT community: AI. Problem was, how do I even start? AI is a huge field, and as I’ve discussed before there’s generative AI and narrow AI. I knew I wanted to start an AI project, but I just didn’t know what to start with; then it hit me.
I’m an avid playing card collector. I have a modest collection of cards varying in price, rarity, and playability. I currently use a paid solution to keep track of my collection and its value. Let’s try to replicate this paid solution in-house.
The Goal
The goal of this project is to build an AI system that is going to detect which playing card is in sight, report back it’s stats (cost, rarity, set, etc.), and store that in a local database to create an inventory of my collection.
Hardware
Here is what I am starting with:
- + Raspberry Pi 5 8 GB model – https://www.raspberrypi.com/products/raspberry-pi-5/
- + Raspberry Pi AI HAT+ 2 – https://www.raspberrypi.com/products/ai-hat-plus-2/
- + Arducam | Raspberry Pi Camera – https://a.co/d/0hfYNjjI
- + SD XC Card 512 GB – https://a.co/d/0dRxvond
Basic peripherals from my lab are needed – Monitor, Keyboard & Mouse, USB C cables, Mini HDMI adapter, HDMI Cable, etc. Source those yourself!
The upfront investment is the Raspberry Pi hardware. Those are high in demand, which is the reason for the skyrocket in price. Hopefully this project pays off.
Let’s Get Ready to Rumble
First off, take your SD card and image it with Raspberry Pi OS. We’re going to use the full version of this Linux based OS, so that we have a GUI. I’d prefer not to brush up on Linux shell on top of brushing up on Python. You can download the image here > https://www.raspberrypi.com/software/operating-systems/, then burn it to your SD card using Rufus, Bletcher, or your favorite imaging utility.
*Flash* *Snap* Image
Or, you can use the official “Raspberry Pi Imager”, which allows you to download and burn the image at the same time. Helluva lot easier! Follow along below if you choose to go this route.
I went with the Raspberry Pi OS 64-bit image to start.

On the preceding screen, I paused… “Choose hostname”, it took me 30 minutes plus a consultation with my wife on what I should name my creation. We decided to name it “ToddSnap” Todd Snap is the name of the protagonist of Pokemon Snap, a video game where you go around taking pictures of Pokemon. We felt it was appropriate for this project.

Follow through the next few prompts entering specific information to your environment:
- – Localisation (date, timezone, and keyboard layout)
- – Username (this is your administrative user. keep track of these credentials!)
- – Wi-Fi (enter in your Wi-Fi information)
- – SSH Authentication (I usually do this for local projects. Saves me time and energy when setting up a project. I can just SSH into it rather than hooking the Pi to a monitor)
- – Raspberry Pi Connect (This is new to me. I turned this off)
Once you’ve made it through the prompts, sit back and relax while your SD card images.

Some Assembly Required
While the SD card writes, now is a good time to assemble your device. I waited until I had a chance to review the documentation before hooking up the AI hat as I wasn’t sure if drivers were needed. According to the docs, it seems very plug-and-play. So put it all together while you’ve got some downtime.
i found it easier to install the camera before putting on the AI hat. The camera came with an additional PCIe cable that fits the CAM/DISP port on the Pi 5. Carefully replace the PCIe cable. You’ll want to seat the cable in the “CAM/DISP 0” port.

Once the camera is in securely, place the GPIO extension that you got from the PI Hat onto your PI’s GPIO pin set. Then attach the cable between the hat and the Pi, fasten down the hat to the Pi using the screws and expanders that came with the hat, and finally slide the hat on top of the Pi fitting snuggly over the GPIO pins.

I put mine in a case, this is optional. At the end of the day, it should look like this:

If It Can Go Wrong It Will Go Wrong
In sake of full transparency, phase 1 didn’t go as smooth as I expected. I am utilizing a SD XC card from an old Nintendo Switch. This SD card had Nintendo’s funky write protection on it. So I had to use DISKPART to clean all data from the card, create a new primary partition, and reformat the SD card. But that still didn’t work. For time’s sake, I scrapped this card and purchased a new one.

That’s Enough for Today
After assembly, your imaging should be finished. Pop that SD card into the disk slot on the underside of the Pi and you’re good to boot up the Pi. If you didn’t use the Raspberry Pi Imager you’ll have to run through the first time setup on the Pi, but that’s easy stuff and you shouldn’t need me for that.
I’m going to wrap it up there. See ya’ next time for some software configurations!