readme-generator

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

README Generator

README 生成器

Creates professional, beginner-friendly README files for maker projects.
为创客项目生成专业、对新手友好的README文件。

Resources

资源

This skill includes bundled tools:
  • scripts/generate_readme.py - Full README generator with wiring diagrams and templates
该技能包含内置工具:
  • scripts/generate_readme.py - 完整的README生成器,包含接线图和模板

Quick Start

快速开始

Interactive mode:
bash
uv run --no-project scripts/generate_readme.py --interactive
Quick generation:
bash
uv run --no-project scripts/generate_readme.py --project "Weather Station" --board "ESP32" --output README.md
Scan existing project:
bash
uv run --no-project scripts/generate_readme.py --scan /path/to/arduino/project --output README.md
交互模式:
bash
uv run --no-project scripts/generate_readme.py --interactive
快速生成:
bash
uv run --no-project scripts/generate_readme.py --project "Weather Station" --board "ESP32" --output README.md
扫描现有项目:
bash
uv run --no-project scripts/generate_readme.py --scan /path/to/arduino/project --output README.md

When to Use

使用场景

  • "Help me document this project"
  • "I want to share this on GitHub"
  • "Write a README for my project"
  • User has working project, needs documentation
  • Before publishing to GitHub/Instructables
  • "帮我为这个项目编写文档"
  • "我想把这个项目分享到GitHub"
  • "为我的项目写一份README"
  • 用户已有可运行的项目,需要编写文档
  • 发布到GitHub/Instructables之前

Information Gathering

信息收集

Ask User For:

需要向用户询问的信息:

1. Project name and one-line description
2. What problem does it solve / why did you build it?
3. Main features (3-5 bullet points)
4. Hardware components used
5. Software libraries required
6. Any photos/videos/GIFs available?
7. License preference (MIT recommended for open source)
8. Target audience (beginners/intermediate/advanced)
1. 项目名称和一句话描述
2. 它解决了什么问题 / 你为什么要构建它?
3. 主要功能(3-5个要点)
4. 使用的硬件组件
5. 需要的软件库
6. 是否有相关照片/视频/GIF?
7. 许可证偏好(开源项目推荐使用MIT许可证)
8. 目标受众(新手/中级/高级)

Auto-Extract From Code:

从代码中自动提取的信息:

  • Pin assignments from config.h
  • Library includes
  • WiFi/Bluetooth features
  • Sensor types

  • 从config.h中提取引脚分配
  • 库引用
  • WiFi/蓝牙功能
  • 传感器类型

README Template

README模板

Generate using this structure (based on awesome-readme best practices):
markdown
undefined
基于awesome-readme最佳实践,按照以下结构生成:
markdown
undefined

🎯 [Project Name]

🎯 [项目名称]

Project Status Platform License
One-line description of what this project does and why it's useful.
Project Photo/GIF
项目状态 平台 许可证
一句话描述该项目的功能及其实用价值。
项目照片/GIF

📋 Table of Contents

📋 目录

🔍 Overview

🔍 概述

[2-3 paragraphs explaining:]
  • What the project does
  • Why you built it / what problem it solves
  • Who it's for (target audience)
[2-3段文字说明:]
  • 该项目的功能
  • 你构建它的原因 / 它解决了什么问题
  • 目标用户群体

Demo

演示

[Embed video or GIF showing project in action]
[嵌入展示项目运行的视频或GIF]

✨ Features

✨ 功能

  • ✅ Feature 1 - brief description
  • ✅ Feature 2 - brief description
  • ✅ Feature 3 - brief description
  • 🚧 Planned: Feature 4 (coming soon)
  • ✅ 功能1 - 简要描述
  • ✅ 功能2 - 简要描述
  • ✅ 功能3 - 简要描述
  • 🚧 计划中:功能4(即将推出)

🔧 Hardware Components

🔧 硬件组件

ComponentQuantityPurposeNotes
[MCU Board]1Main controller[version/variant]
[Sensor 1]1[function][I2C address, etc.]
[Display]1User interface[resolution]
............
Estimated Cost: $XX-XX
组件数量用途备注
[MCU开发板]1主控制器[版本/型号]
[传感器1]1[功能][I2C地址等]
[显示屏]1用户界面[分辨率]
............
预估成本:$XX-XX

Where to Buy

购买渠道

  • Component 1 - Amazon/AliExpress
  • Component 2 - Adafruit/SparkFun
  • 组件1 - Amazon/AliExpress
  • 组件2 - Adafruit/SparkFun

📐 Wiring Diagram

📐 接线图

Wiring Diagram
接线图

Pin Connections

引脚连接

MCU PinComponentPinFunction
GPIO21BME280SDAI2C Data
GPIO22BME280SCLI2C Clock
GPIO4LEDAnodeStatus indicator
............
MCU引脚组件引脚功能
GPIO21BME280SDAI2C数据
GPIO22BME280SCLI2C时钟
GPIO4LED阳极状态指示灯
............

💻 Software Dependencies

💻 软件依赖

Required Software

所需软件

Required Libraries

所需库

LibraryVersionPurposeInstall via
[Library1]>=1.0.0[function]Library Manager
[Library2]>=2.3.0[function]Library Manager
............
版本用途安装方式
[库1]>=1.0.0[功能]库管理器
[库2]>=2.3.0[功能]库管理器
............

📦 Installation

📦 安装

Option 1: Arduino IDE

选项1:Arduino IDE

  1. Install Arduino IDE
  2. Add Board Support (if using ESP32/RP2040)
    File → Preferences → Additional Board Manager URLs:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
    Then: Tools → Board → Boards Manager → Search "[board]" → Install
  3. Install Required Libraries
    • Sketch → Include Library → Manage Libraries
    • Search and install each library from the table above
  4. Clone or Download This Repository
    bash
    git clone https://github.com/[username]/[repo-name].git
    Or download ZIP and extract
  5. Open the Project
    • Open
      [project-name].ino
      in Arduino IDE
  1. 安装Arduino IDE
  2. 添加开发板支持(如果使用ESP32/RP2040)
    文件 → 首选项 → 附加开发板管理器网址:
    https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
    然后:工具 → 开发板 → 开发板管理器 → 搜索“[开发板]” → 安装
  3. 安装所需库
    • 项目 → 包含库 → 管理库
    • 搜索并安装上表中的每个库
  4. 克隆或下载本仓库
    bash
    git clone https://github.com/[用户名]/[仓库名].git
    或者下载ZIP包并解压
  5. 打开项目
    • 在Arduino IDE中打开
      [项目名].ino

Option 2: PlatformIO (Recommended for Advanced Users)

选项2:PlatformIO(推荐给高级用户)

  1. Clone and open:
    bash
    git clone https://github.com/[username]/[repo-name].git
    cd [repo-name]
    code .
  2. PlatformIO will automatically install dependencies from
    platformio.ini
  1. 克隆并打开项目:
    bash
    git clone https://github.com/[用户名]/[仓库名].git
    cd [仓库名]
    code .
  2. PlatformIO会自动从
    platformio.ini
    安装依赖

⚙️ Configuration

⚙️ 配置

Before uploading, customize
config.h
:
cpp
// === NETWORK SETTINGS ===
#define WIFI_SSID     "your-wifi-name"
#define WIFI_PASSWORD "your-wifi-password"

// === HARDWARE PINS ===
#define LED_PIN       4
#define SENSOR_SDA    21
#define SENSOR_SCL    22

// === FEATURE FLAGS ===
#define ENABLE_OLED   true
#define ENABLE_WIFI   true
#define DEBUG_MODE    true
上传前,自定义
config.h
cpp
// === 网络设置 ===
#define WIFI_SSID     "你的WiFi名称"
#define WIFI_PASSWORD "你的WiFi密码"

// === 硬件引脚 ===
#define LED_PIN       4
#define SENSOR_SDA    21
#define SENSOR_SCL    22

// === 功能开关 ===
#define ENABLE_OLED   true
#define ENABLE_WIFI   true
#define DEBUG_MODE    true

Environment-Specific Settings

环境特定设置

SettingDevelopmentProduction
DEBUG_MODEtruefalse
SERIAL_BAUD1152009600
SLEEP_INTERVAL10s300s
设置开发环境生产环境
DEBUG_MODEtruefalse
SERIAL_BAUD1152009600
SLEEP_INTERVAL10s300s

🚀 Usage

🚀 使用方法

Basic Operation

基本操作

  1. Power On - Connect USB or battery
  2. Wait for Boot - Status LED blinks during initialization
  3. [Normal Operation] - Description of what happens
  1. 开机 - 连接USB或电池
  2. 等待启动 - 初始化期间状态LED闪烁
  3. [正常运行] - 描述运行时的行为

LED Status Indicators

LED状态指示

LED StateMeaning
Solid GreenNormal operation
Blinking BlueWiFi connecting
Red FlashError (check serial)
LED状态含义
常亮绿色正常运行
闪烁蓝色WiFi连接中
红色闪烁错误(查看串口输出)

Serial Monitor

串口监视器

Open Serial Monitor at 115200 baud to see:
[BOOT] Project Name v1.0.0
[INFO] Initializing sensors...
[OK] BME280 found at 0x76
[INFO] Connecting to WiFi...
[OK] Connected: 192.168.1.100
[DATA] Temp: 23.5°C, Humidity: 45%
打开波特率为115200的串口监视器,查看输出:
[BOOT] 项目名称 v1.0.0
[INFO] 初始化传感器...
[OK] BME280在0x76地址被发现
[INFO] 连接WiFi...
[OK] 已连接:192.168.1.100
[DATA] 温度:23.5°C,湿度:45%

Web Interface (if applicable)

网页界面(如果适用)

Navigate to
http://[device-ip]
to access:
  • Real-time sensor readings
  • Configuration panel
  • Data export
访问
http://[设备IP]
以使用:
  • 实时传感器读数
  • 配置面板
  • 数据导出

❓ Troubleshooting

❓ 故障排除

Common Issues

常见问题

<details> <summary><b>Upload fails: "Failed to connect"</b></summary>
ESP32: Hold BOOT button while clicking Upload, release when "Connecting..." appears.
Arduino: Check correct COM port selected in Tools → Port.
</details> <details> <summary><b>Sensor not detected</b></summary>
  1. Check wiring (SDA/SCL not swapped?)
  2. Run I2C scanner sketch to verify address
  3. Add pull-up resistors (4.7kΩ) if not on module
  4. Check voltage compatibility (3.3V vs 5V)
</details> <details> <summary><b>WiFi won't connect</b></summary>
  1. Verify SSID/password in config.h (case-sensitive!)
  2. 2.4GHz only (ESP32 doesn't support 5GHz)
  3. Check router isn't blocking new devices
  4. Try moving closer to router
</details> <details> <summary><b>Random resets</b></summary>
  1. Power supply too weak - use 500mA+ source
  2. Add 100µF capacitor near MCU
  3. Check for short circuits
  4. Disable brownout detector (ESP32)
</details>
<details> <summary><b>上传失败:"无法连接"</b></summary>
ESP32: 点击上传时按住BOOT按钮,当出现"Connecting..."时松开。
Arduino: 检查在工具 → 端口中选择了正确的COM端口。
</details> <details> <summary><b>传感器未被检测到</b></summary>
  1. 检查接线(SDA/SCL是否接反?)
  2. 运行I2C扫描草图以验证地址
  3. 如果模块上没有上拉电阻,添加4.7kΩ上拉电阻
  4. 检查电压兼容性(3.3V vs 5V)
</details> <details> <summary><b>WiFi无法连接</b></summary>
  1. 验证config.h中的SSID/密码(区分大小写!)
  2. 仅支持2.4GHz(ESP32不支持5GHz)
  3. 检查路由器是否阻止新设备
  4. 尝试靠近路由器
</details> <details> <summary><b>随机重启</b></summary>
  1. 电源供应不足 - 使用500mA以上的电源
  2. 在MCU附近添加100µF电容
  3. 检查是否存在短路
  4. 禁用掉电检测器(ESP32)
</details>

Still Stuck?

仍然遇到问题?

  1. Check Issues for similar problems
  2. Open a new issue with:
    • Hardware setup (board, sensors)
    • Error messages (full serial output)
    • Steps to reproduce
  1. 查看Issues中是否有类似问题
  2. 提交新Issue,包含:
    • 硬件设置(开发板、传感器)
    • 错误信息(完整串口输出)
    • 复现步骤

🤝 Contributing

🤝 贡献指南

Contributions are welcome! Here's how:
欢迎贡献!方式如下:

Reporting Bugs

报告Bug

  1. Check existing issues first
  2. Use the bug report template
  3. Include serial output and hardware details
  1. 先检查现有Issue
  2. 使用Bug报告模板
  3. 包含串口输出和硬件细节

Suggesting Features

功能建议

  1. Open an issue with
    [Feature Request]
    prefix
  2. Describe use case and expected behavior
  1. 提交Issue,标题前缀为
    [Feature Request]
  2. 描述使用场景和预期行为

Pull Requests

拉取请求(Pull Requests)

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/amazing-feature
  3. Make your changes
  4. Test thoroughly
  5. Commit:
    git commit -m 'Add amazing feature'
  6. Push:
    git push origin feature/amazing-feature
  7. Open a Pull Request
  1. Fork本仓库
  2. 创建功能分支:
    git checkout -b feature/awesome-feature
  3. 进行修改
  4. 彻底测试
  5. 提交:
    git commit -m 'Add amazing feature'
  6. 推送:
    git push origin feature/amazing-feature
  7. 打开拉取请求

Code Style

代码风格

  • Use meaningful variable names
  • Comment complex logic
  • Follow existing formatting
  • Test on actual hardware before PR
  • 使用有意义的变量名
  • 为复杂逻辑添加注释
  • 遵循现有格式
  • 提交PR前在实际硬件上测试

📄 License

📄 许可证

This project is licensed under the MIT License - see the LICENSE file for details.
MIT License

Copyright (c) [year] [author]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
本项目采用MIT许可证 - 详情请查看LICENSE文件。
MIT License

Copyright (c) [年份] [作者]

特此免费授予任何获得本软件及相关文档文件(以下简称“软件”)副本的人,不受限制地处理本软件,包括但不限于使用、复制、修改、合并、发布、分发、再许可和/或销售软件副本的权利,以及允许向其提供软件的人做出上述行为,但须符合以下条件:

上述版权声明和本许可声明应包含在软件的所有副本或实质部分中。

🙏 Acknowledgments

🙏 致谢

  • [Library/Project] - for [what it provides]
  • [Person/Tutorial] - inspiration/guidance
  • [Community] - testing and feedback
  • [库/项目] - 提供了[功能]
  • [个人/教程] - 灵感/指导
  • [社区] - 测试和反馈

📬 Contact

📬 联系方式

[Your Name] - @twitter_handle - email@example.com

⭐ If this project helped you, please give it a star!

---
[你的名字] - @twitter_handle - email@example.com

⭐ 如果这个项目对你有帮助,请给它点个星!

---

Section Guidelines

板块指南

Good vs Bad Examples

好与坏的示例

Project Description:
❌ Bad: "An Arduino project with sensors"
✅ Good: "Battery-powered environmental monitor that tracks temperature, 
         humidity, and air quality, sending alerts when thresholds are exceeded"
Features:
❌ Bad: "Has WiFi"
✅ Good: "📶 WiFi connectivity with automatic reconnection and OTA updates"
Installation Steps:
❌ Bad: "Install the libraries and upload"
✅ Good: Step-by-step with screenshots, version numbers, exact menu paths
项目描述:
❌ 不好:"一个带传感器的Arduino项目"
✅ 好:"基于电池的环境监测器,可跟踪温度、湿度和空气质量,当超过阈值时发送警报"
功能:
❌ 不好:"有WiFi"
✅ 好:"📶 WiFi连接,支持自动重连和OTA更新"
安装步骤:
❌ 不好:"安装库并上传"
✅ 好:带截图、版本号、准确菜单路径的分步说明

Visual Assets

视觉资源

Recommended:
  • Project photo (hero image)
  • Wiring diagram (Fritzing or hand-drawn)
  • Demo GIF (< 5MB, 10-15 seconds)
  • Schematic (KiCad export)
Creating GIFs:
  • Use ScreenToGif (Windows) or Peek (Linux)
  • Optimize with ezgif.com
  • Keep under 5MB for GitHub
推荐:
  • 项目照片(主图)
  • 接线图(Fritzing或手绘)
  • 演示GIF(<5MB,10-15秒)
  • 原理图(KiCad导出)
创建GIF:
  • 使用ScreenToGif(Windows)或Peek(Linux)
  • 使用ezgif.com优化
  • GitHub上请保持在5MB以下

Badges

徽章

markdown
<!-- Status badges -->
![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
![Version](https://img.shields.io/badge/version-1.0.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)

<!-- Platform badges -->
![Arduino](https://img.shields.io/badge/platform-Arduino-00979D?logo=arduino)
![ESP32](https://img.shields.io/badge/platform-ESP32-blue)
![Raspberry Pi](https://img.shields.io/badge/platform-RPi_Pico-C51A4A)

<!-- Social badges -->
![GitHub stars](https://img.shields.io/github/stars/user/repo)
![GitHub forks](https://img.shields.io/github/forks/user/repo)

markdown
<!-- 状态徽章 -->
![Build Status](https://img.shields.io/badge/build-passing-brightgreen)
![Version](https://img.shields.io/badge/version-1.0.0-blue)
![License](https://img.shields.io/badge/license-MIT-green)

<!-- 平台徽章 -->
![Arduino](https://img.shields.io/badge/platform-Arduino-00979D?logo=arduino)
![ESP32](https://img.shields.io/badge/platform-ESP32-blue)
![Raspberry Pi](https://img.shields.io/badge/platform-RPi_Pico-C51A4A)

<!-- 社交徽章 -->
![GitHub stars](https://img.shields.io/github/stars/user/repo)
![GitHub forks](https://img.shields.io/github/forks/user/repo)

File Structure Recommendation

文件结构建议

project-name/
├── README.md              # Main documentation
├── LICENSE                # MIT license file
├── .gitignore            # Ignore build files
├── src/
│   ├── main.ino          # Main sketch
│   └── config.h          # User configuration
├── lib/                  # Local libraries (optional)
├── docs/
│   ├── WIRING.md         # Detailed wiring guide
│   ├── API.md            # API documentation (if applicable)
│   └── CHANGELOG.md      # Version history
├── images/
│   ├── project-photo.jpg
│   ├── wiring-diagram.png
│   └── demo.gif
├── hardware/             # PCB/enclosure files (optional)
│   ├── schematic.pdf
│   └── enclosure.stl
└── examples/             # Additional example sketches
    └── basic/

项目名称/
├── README.md              # 主文档
├── LICENSE                # MIT许可证文件
├── .gitignore            # 忽略构建文件
├── src/
│   ├── main.ino          # 主草图
│   └── config.h          # 用户配置
├── lib/                  # 本地库(可选)
├── docs/
│   ├── WIRING.md         # 详细接线指南
│   ├── API.md            # API文档(如果适用)
│   └── CHANGELOG.md      # 版本历史
├── images/
│   ├── project-photo.jpg
│   ├── wiring-diagram.png
│   └── demo.gif
├── hardware/             # PCB/外壳文件(可选)
│   ├── schematic.pdf
│   └── enclosure.stl
└── examples/             # 额外示例草图
    └── basic/

Quick README Checklist

README快速检查清单

Before publishing, verify:
□ Project name is clear and memorable
□ One-line description explains the "what" and "why"
□ Hero image/GIF shows project in action
□ All hardware components listed with links
□ Wiring diagram included
□ All libraries listed with versions
□ Step-by-step installation instructions
□ Configuration section explains all settings
□ Usage section shows expected output
□ Troubleshooting covers common issues
□ License file present
□ Contact information included
□ No broken links
□ Spelling/grammar checked
发布前,请验证:
□ 项目名称清晰易记
□ 一句话描述说明了“是什么”和“为什么”
□ 主图/GIF展示了项目运行状态
□ 列出了所有硬件组件及链接
□ 包含接线图
□ 列出了所有库及版本
□ 分步安装说明
□ 配置部分解释了所有设置
□ 使用方法部分展示了预期输出
□ 故障排除涵盖了常见问题
□ 存在许可证文件
□ 包含联系方式
□ 没有无效链接
□ 检查了拼写/语法