AI 资讯
From Pixels to Prescriptions: Building a Smart Pill Reminder with YOLOv8 and Raspberry Pi
Taking the right medication at the right time is more than just a routine—it's a critical part of healthcare. However, for the elderly or those with complex prescriptions, "pill fatigue" is real. Mistakes happen. In this tutorial, we are diving deep into Computer Vision , Edge AI , and IoT to build a real-time pill identification and reminder system. We will leverage YOLOv8 for multi-pill detection and semantic segmentation, deploy it on a Raspberry Pi , and use MQTT to trigger physical alarms or notifications. Whether you are looking to master real-time object detection , explore embedded AI implementation , or build a life-saving IoT device , this guide has you covered! The Architecture: From Vision to Action 🏗️ The system follows a classic Edge-to-Cloud (or Edge-to-Local) pattern. The Raspberry Pi acts as the brain, processing image frames locally to ensure privacy and low latency. graph TD A[Raspberry Pi Camera] -->|Video Stream| B[OpenCV Preprocessing] B --> C{YOLOv8 Engine} C -->|Detection/Segmentation| D[Logic Layer: Check Schedule] D -->|Match/Mismatch| E[MQTT Broker] E -->|Publish Topic| F[Physical Alarm / Buzzer] E -->|Status Update| G[Mobile App/Dashboard] D -->|Log Data| H[Local Database] Prerequisites 🛠️ To follow along, you'll need: Hardware : Raspberry Pi 4B/5 (8GB recommended), Camera Module (V2 or HQ). Tech Stack : YOLOv8 : For state-of-the-art segmentation and detection. OpenCV : For image manipulation. Paho-MQTT : For the messaging protocol. Ultralytics : The framework powering our model. Step 1: Training the YOLOv8 Segmentation Model While YOLOv8 is famous for object detection, we use Semantic Segmentation here to precisely calculate the area and shape of pills, which helps distinguish between very similar-looking tablets. from ultralytics import YOLO # Load a pretrained model model = YOLO ( ' yolov8n-seg.pt ' ) # Train the model on our custom pill dataset # Assume we have a 'pills.yaml' defining classes: 'aspirin', 'vitamin_c', etc. results = mo
AI 资讯
Build a Palm-Sized POV TV with a Raspberry Pi Pico
Clear a corner of your workbench and gather a handful of parts, because this palm-sized television is an afternoon build, not a semester project. Here is the shopping list for a Scanwheel of your own: A Raspberry Pi Pico to run the show An A4988 stepper driver A 21-02485 stepper motor (or a similar small NEMA-style unit) Five LEDs, plus current-limiting resistors A 3D-printed case and spinning disk The Scanwheel, built by a maker who goes by [Ancient], is a mechanical TV that fits in your hand. Instead of a glowing panel, it leans on persistence of vision: your eye holds each flash of light for a fraction of a second, so a row of blinking LEDs seen through a moving slit reads as a solid picture. Spin the disk fast enough and the flicker melts into an image. How the picture actually forms The disk sitting on top of the case carries 20 small holes spaced evenly around its edge, each drilled at a slightly different height. As the motor turns, only one hole passes in front of the LEDs at a time, so light escapes in a scanning line rather than a wash. The Pico drives the stepper up to roughly 900 RPM through the A4988, then fires the LEDs in a precise order timed to the disk position. Get that timing right and the holes trace out a grid. The payoff is a 20x20 pixel color display in the center, flanked by two more 20x20 black-and-white panels that can each show a different image. Five LEDs feed all three. The whole coordination job lives on the Pico's GPIO pins, which is why the wiring stays simple enough to manage on a breadboard before you commit anything to a soldered protoboard. Small light baffles in the base keep the LEDs from bleeding into each other, a detail worth copying if your first image looks smeared. Give it a spin The full build guide, firmware, and disk files are on the project's GitHub repository , so you can match the hole spacing and LED timing exactly. If your image drifts or tears, start by trimming the RPM and re-checking when each LED switches rela
AI 资讯
The Second Brain They Can’t Subpoena: Local RAG on a Pi 5
If your memory is hosted, your thoughts are leased. We did not just move our files to the cloud. We moved our working memory. Andy Clark and David Chalmers called it the extended mind in 1998. The thesis was simple. Cognition leaks into the tools we trust. A notebook can be part of your mind if you access it reliably. In 2026, that notebook is a vector database owned by a platform with a legal department. Your extended mind now has terms of service, retention policies, and a compliance team that answers subpoenas faster than you answer email. I am not interested in nostalgia for paper. I am interested in architecture that preserves agency. The fix is not to think less with machines. It is to think locally with machines you control. That is why I built a second brain that lives on a Raspberry Pi 5 with NVMe and a Hailo-8 accelerator, running Retrieval Augmented Generation completely offline. No API keys. No telemetry. No third party that can be compelled to hand over your associative graph. This is the expanded blueprint. More cohesive, more rigorous, and more useful than the usual cloud versus local sermon. The extended mind, now with a landlord The original extended mind argument was about trust and coupling. If you reach for a tool as automatically as you reach for a memory, it counts as cognition. The cloud broke that coupling by inserting a landlord. Your retrieval is fast, but it is also observed, logged, ranked, and retained. Three consequences follow. First, epistemic pollution. When your queries train their models, your future answers are shaped by everyone else’s queries. Your private context gets diluted by the median user. Second, legal exposure. Your prompts, your uploads, your retrieval history, and your embeddings are business records. In many jurisdictions they are discoverable. You cannot plead the fifth for data you gave to a provider. Third, strategic fragility. A policy change, a price hike, a region block, and your cognitive prosthesis goes dark.
AI 资讯
I Stopped Paying Google and Built My Own Cloud
How I replaced Google Photos, Google Drive, and Google Home with a self-hosted Raspberry Pi 5 setup - and what the full technical stack looks like. There's a quiet moment every tech-literate person eventually hits. You open your cloud storage dashboard, see the number creeping up, and think: I'm paying a subscription fee, every month, forever, just to store my own photos and files on someone else's computer. That was me, but with a bit of added weight. It's not just my data I'm responsible for. Over the years, I've quietly become the unofficial digital curator for my entire family . The person everyone sends photos to after a birthday party. The one who backs up the wedding videos. The one who scans and stores the important documents, passports, contracts, and sentimental things so they don't get lost. My parents, siblings, extended family: if something matters and it's digital, there's a good chance it eventually lands with me. That's a responsibility I take seriously. And for a long time, Google was my answer - until the storage bill started quietly creeping past 2TB, and I started thinking more carefully about what it actually means to hand all of that data over to "big tech" . So I built my own home server. A tiny, almost silent box sitting in my house that now handles everything Google Drive and Google Photos did, plus more, for a one-time hardware cost of £340. This is the story of how I did it, why I did it, and exactly how you can too. Why I Did It The cost was the trigger, but it wasn't the only reason. When you use Google Photos, Google Drive, or any cloud storage service, your files live on their servers. You're trusting a corporation to keep them safe, not snoop through them, not change their pricing, and not shut down the product one day. Google has a long history of killing beloved products. Google Photos itself famously ended its unlimited free tier in 2021. As well as this, recent AI trends and auto opt-in data processing had me thinking there had to
开发者
Build a Cloud-Connected Weather Station with Arduino UNO R4 WiFi
Learn how to build a real IoT weather station using the Arduino UNO R4 WiFi and BME280 sensor, sending live temperature, humidity, and pressure data to Arduino IoT Cloud — with full code, wiring diagrams, and dashboard. What We're Building In this project, you'll build a cloud-connected weather station that measures: Temperature (°C / °F) Humidity (%) Atmospheric Pressure (hPa) All three readings will be streamed live to the Arduino IoT Cloud , where you can monitor them from anywhere in the world via a browser or the free Arduino IoT Remote app on your phone. Components Required Component Qty Notes Arduino UNO R4 WiFi 1 Built-in ESP32-S3 WiFi module BME280 Sensor Module 1 Measures temp + humidity + pressure via I²C Breadboard 1 Full or half size Jumper Wires (M-M) 4 For I²C connections USB-A to USB-C Cable 1 For power & programming Why BME280 over DHT22? The BME280 gives you three measurements (including barometric pressure) over a single I²C bus using just 2 wires, making it more capable and cleaner to wire. The DHT22 only gives temperature and humidity. Wiring the BME280 to Arduino UNO R4 WiFi The BME280 uses the I²C protocol , so it only needs 4 wires: BME280 Pin → Arduino UNO R4 WiFi Pin ────────────────────────────────────── VCC → 3.3V GND → GND SDA → A4 (I²C Data) SCL → A5 (I²C Clock) Important: The BME280 runs on 3.3V , not 5V. Connecting it to the 5V pin can damage the sensor permanently. Here's the schematic overview: ┌────────────────────────────┐ │ Arduino UNO R4 WiFi │ │ │ │ 3.3V ──────────────► VCC │ │ GND ──────────────► GND │ ← BME280 │ A4 ──────────────► SDA │ │ A5 ──────────────► SCL │ └────────────────────────────┘ ☁️ Step 1 — Set Up Arduino IoT Cloud Before writing any code, you need to configure the Arduino IoT Cloud . It's free for up to 2 devices. 1.1 Create a Free Account Go to cloud.arduino.cc and sign up or log in. 1.2 Create a New "Thing" Click Things in the left sidebar Click + Create Thing Name it WeatherStation 1.3 Add Your Device Click