You are browsing as a guest. Sign up (or log in) to start making projects!

Open comments for this post

46m 13s logged

Building Hardware Reference Bot

Ever been working on a hardware project and had to stop just to calculate a resistor value, find a datasheet, or check an MCU pinout?

That tiny “let me Google this” moment happens constantly in electronics work. So for Hack Club’s Stardance YSWS, I built Hardware Reference Bot — a FastAPI Slack slash-command bot that provides quick hardware references directly inside Slack.

Features

/dp-resistor <bands>

Calculates 4-band and 5-band resistor values from color bands.

Example:

/dp-resistor brown black red gold

Returns the resistor value and tolerance instantly.

/dp-datasheet <part_number>

Generates quick datasheet search links for:

  • Octopart
  • Manufacturer datasheet search
  • AllDataSheet

No scraping or PDF parsing—just fast access to references.

/dp-pinout <mcu>

Returns a curated pinout/peripheral cheatsheet.

Currently supported:

  • STM32G474
  • ESP32-C3

MCU data is stored in JSON, making it easy to add new devices.

Project Structure

app/
├── main.py
├── config.py
├── commands/
└── data/

tests/
Dockerfile
docker-compose.yml
slack-app-manifest.yaml
.env.example

Endpoints

GET /healthz
POST /slack/events

Deployment

The app is containerized with Docker and planned for deployment via Coolify:

  1. Build Docker image
  2. Configure Slack secrets
  3. Expose port 8000
  4. Connect Cloudflare Tunnel
  5. Update Slack command URLs
  6. Use /healthz for health checks

Implementation Notes

Slash command handlers immediately call ack() and send responses through Bolt’s respond() helper. This satisfies Slack’s response timing requirements while keeping responses clean and formatted.

Why?

Hardware development involves dozens of tiny reference lookups every day. Instead of opening multiple tabs, Hardware Reference Bot keeps common references one command away inside the place you’re already collaborating.

Planned Features

  • More MCU pinouts
  • Better pinout formatting
  • Capacitor code lookup
  • Package reference guides
  • Ohm’s law helpers
  • Additional hardware utilities

Everything hardware, one command away.

0
1

Comments 0

No comments yet. Be the first!