Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Voice-activated trash bin disposal. Just say “KOBE” (Work In Progress).

License

Notifications You must be signed in to change notification settings

chornge/wish_and_swish

Repository files navigation

Wish & Swish

The voice-activated trash can lid that opens on command

Making waste disposal clean, effortless, and a little bit fun.

CI/CD Version License Rust Platform


✨ Features

Feature Description
🎤 Voice-Activated Custom wake word of your choice — "Kobe", "Open Sesame", or anything you want
⏱️ Auto-Close Timer Opens for 5 seconds, then quietly closes itself
🧼 Hygienic Design No touching necessary — keep your hands clean and germ-free
🔋 Battery-Powered Low-power design with easily swappable batteries
🔊 Smart Detection Works in noisy environments with advanced keyword recognition

🛠️ How It Works

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│       01        │    │       02        │    │       03        │    │       04        │
│  Set Your Word  │───▶│   Just Say It   │───▶│  Perfect Timing │───▶│   Auto-Close    │
│                 │    │                 │    │                 │    │                 │
│ Choose "Kobe"   │    │ Speak from      │    │ Lid opens for   │    │ Closes quietly  │
│ or get creative │    │ across the room │    │ exactly 5 secs  │    │ on its own      │
└─────────────────┘    └─────────────────┘    └─────────────────┘    └─────────────────┘

📦 Project Structure

This is a monorepo containing:

wish_and_swish/
├── embedded/          # Rust code for Raspberry Pi
│   └── src/
│       ├── audio/     # Microphone & wake word detection
│       └── motor/     # Stepper motor control
├── web/               # Next.js landing page
└── model.rpw          # Wake word model file

🏗️ Architecture

Design Doc


🧰 Components Required

Component Notes
Raspberry Pi 4B aarch64-unknown-linux-gnu target
USB Microphone Or compatible GPIO microphone
Stepper Motor + Driver A4988 or DRV8825 recommended
Power Supply Battery pack
Jumper Wires & Breadboard For prototyping
Trash Can With foot pedal mechanism
📌 GPIO Pin Configuration

GPIO Pins

Stepper Motor Pins: 17, 27, 22, 23 (Physical: 11, 13, 15, 16)


🚀 Getting Started

Prerequisites

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Install system dependencies (Raspberry Pi)
sudo apt install -y libclang-dev libasound2-dev

# Add target and components
rustup target add aarch64-unknown-linux-gnu
rustup component add rustfmt clippy llvm-tools
cargo install cargo-binutils

Installation

# Clone the repository
git clone https://github.com/chornge/wish_and_swish.git
cd wish_and_swish

Build & Run

Embedded (Raspberry Pi)

cd embedded
cargo build --release --features gpio
cargo run --release

Embedded (Dev Machine)

cd embedded
cargo build --no-default-features

Web (Landing Page)

cd web
pnpm install
pnpm dev

🎯 Use Cases

  • 🍳 Kitchen — Toss scraps while cooking without touching the lid
  • 💼 Office — Touchless waste disposal for the entire team
  • 🏠 Home — Bedrooms, bathrooms, craft rooms
  • 🎓 Dorms — Have fun with friends, shoot hoops from across the room!

🔧 Troubleshooting

Wake word "Kobe" not detected?
  • Ensure your microphone is correctly configured
  • Check microphone positioning
  • Verify the correct device index in main.rs
  • Test with rustpotter-cli directly
Motor not activating?
  • Check wiring and motor driver connections
  • Verify GPIO pin configuration matches your setup
  • Ensure power supply provides adequate voltage/current

📄 License

Distributed under the Apache 2.0 License. See LICENSE for more information.


🙏 Acknowledgements

  • rustpotter — Wake word detection engine
  • rppal — Raspberry Pi GPIO library
  • The open-source community for making projects like this possible

About

Voice-activated trash bin disposal. Just say “KOBE” (Work In Progress).

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published