readme-generator
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseREADME 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 --interactiveQuick generation:
bash
uv run --no-project scripts/generate_readme.py --project "Weather Station" --board "ESP32" --output README.mdScan 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.mdWhen 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]
🎯 [项目名称]
One-line description of what this project does and why it's useful.

一句话描述该项目的功能及其实用价值。

📋 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
🔧 硬件组件
| Component | Quantity | Purpose | Notes |
|---|---|---|---|
| [MCU Board] | 1 | Main controller | [version/variant] |
| [Sensor 1] | 1 | [function] | [I2C address, etc.] |
| [Display] | 1 | User 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
📐 接线图


Pin Connections
引脚连接
| MCU Pin | Component | Pin | Function |
|---|---|---|---|
| GPIO21 | BME280 | SDA | I2C Data |
| GPIO22 | BME280 | SCL | I2C Clock |
| GPIO4 | LED | Anode | Status indicator |
| ... | ... | ... | ... |
| MCU引脚 | 组件 | 引脚 | 功能 |
|---|---|---|---|
| GPIO21 | BME280 | SDA | I2C数据 |
| GPIO22 | BME280 | SCL | I2C时钟 |
| GPIO4 | LED | 阳极 | 状态指示灯 |
| ... | ... | ... | ... |
💻 Software Dependencies
💻 软件依赖
Required Software
所需软件
- Arduino IDE (v2.0+) or PlatformIO
- [Board package] - [installation link]
- Arduino IDE(v2.0+)或 PlatformIO
- [开发板包] - [安装链接]
Required Libraries
所需库
| Library | Version | Purpose | Install 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
-
Install Arduino IDE
- Download from arduino.cc
-
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.jsonThen: Tools → Board → Boards Manager → Search "[board]" → Install -
Install Required Libraries
- Sketch → Include Library → Manage Libraries
- Search and install each library from the table above
-
Clone or Download This Repositorybash
git clone https://github.com/[username]/[repo-name].gitOr download ZIP and extract -
Open the Project
- Open in Arduino IDE
[project-name].ino
- Open
-
安装Arduino IDE
- 从arduino.cc下载
-
添加开发板支持(如果使用ESP32/RP2040)
文件 → 首选项 → 附加开发板管理器网址: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json然后:工具 → 开发板 → 开发板管理器 → 搜索“[开发板]” → 安装 -
安装所需库
- 项目 → 包含库 → 管理库
- 搜索并安装上表中的每个库
-
克隆或下载本仓库bash
git clone https://github.com/[用户名]/[仓库名].git或者下载ZIP包并解压 -
打开项目
- 在Arduino IDE中打开
[项目名].ino
- 在Arduino IDE中打开
Option 2: PlatformIO (Recommended for Advanced Users)
选项2:PlatformIO(推荐给高级用户)
-
Install VS Code + PlatformIO extension
-
Clone and open:bash
git clone https://github.com/[username]/[repo-name].git cd [repo-name] code . -
PlatformIO will automatically install dependencies from
platformio.ini
-
安装VS Code + PlatformIO扩展
-
克隆并打开项目:bash
git clone https://github.com/[用户名]/[仓库名].git cd [仓库名] code . -
PlatformIO会自动从安装依赖
platformio.ini
⚙️ Configuration
⚙️ 配置
Before uploading, customize :
config.hcpp
// === 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.hcpp
// === 网络设置 ===
#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 trueEnvironment-Specific Settings
环境特定设置
| Setting | Development | Production |
|---|---|---|
| DEBUG_MODE | true | false |
| SERIAL_BAUD | 115200 | 9600 |
| SLEEP_INTERVAL | 10s | 300s |
| 设置 | 开发环境 | 生产环境 |
|---|---|---|
| DEBUG_MODE | true | false |
| SERIAL_BAUD | 115200 | 9600 |
| SLEEP_INTERVAL | 10s | 300s |
🚀 Usage
🚀 使用方法
Basic Operation
基本操作
- Power On - Connect USB or battery
- Wait for Boot - Status LED blinks during initialization
- [Normal Operation] - Description of what happens
- 开机 - 连接USB或电池
- 等待启动 - 初始化期间状态LED闪烁
- [正常运行] - 描述运行时的行为
LED Status Indicators
LED状态指示
| LED State | Meaning |
|---|---|
| Solid Green | Normal operation |
| Blinking Blue | WiFi connecting |
| Red Flash | Error (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 to access:
http://[device-ip]- 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>
- Check wiring (SDA/SCL not swapped?)
- Run I2C scanner sketch to verify address
- Add pull-up resistors (4.7kΩ) if not on module
- Check voltage compatibility (3.3V vs 5V)
- Verify SSID/password in config.h (case-sensitive!)
- 2.4GHz only (ESP32 doesn't support 5GHz)
- Check router isn't blocking new devices
- Try moving closer to router
- Power supply too weak - use 500mA+ source
- Add 100µF capacitor near MCU
- Check for short circuits
- Disable brownout detector (ESP32)
<details>
<summary><b>上传失败:"无法连接"</b></summary>
ESP32: 点击上传时按住BOOT按钮,当出现"Connecting..."时松开。
Arduino: 检查在工具 → 端口中选择了正确的COM端口。
</details>
<details>
<summary><b>传感器未被检测到</b></summary>
- 检查接线(SDA/SCL是否接反?)
- 运行I2C扫描草图以验证地址
- 如果模块上没有上拉电阻,添加4.7kΩ上拉电阻
- 检查电压兼容性(3.3V vs 5V)
- 验证config.h中的SSID/密码(区分大小写!)
- 仅支持2.4GHz(ESP32不支持5GHz)
- 检查路由器是否阻止新设备
- 尝试靠近路由器
- 电源供应不足 - 使用500mA以上的电源
- 在MCU附近添加100µF电容
- 检查是否存在短路
- 禁用掉电检测器(ESP32)
Still Stuck?
仍然遇到问题?
- Check Issues for similar problems
- Open a new issue with:
- Hardware setup (board, sensors)
- Error messages (full serial output)
- Steps to reproduce
- 查看Issues中是否有类似问题
- 提交新Issue,包含:
- 硬件设置(开发板、传感器)
- 错误信息(完整串口输出)
- 复现步骤
🤝 Contributing
🤝 贡献指南
Contributions are welcome! Here's how:
欢迎贡献!方式如下:
Reporting Bugs
报告Bug
- Check existing issues first
- Use the bug report template
- Include serial output and hardware details
- 先检查现有Issue
- 使用Bug报告模板
- 包含串口输出和硬件细节
Suggesting Features
功能建议
- Open an issue with prefix
[Feature Request] - Describe use case and expected behavior
- 提交Issue,标题前缀为
[Feature Request] - 描述使用场景和预期行为
Pull Requests
拉取请求(Pull Requests)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test thoroughly
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Fork本仓库
- 创建功能分支:
git checkout -b feature/awesome-feature - 进行修改
- 彻底测试
- 提交:
git commit -m 'Add amazing feature' - 推送:
git push origin feature/amazing-feature - 打开拉取请求
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
Project Link: https://github.com/[username]/[repo-name]
⭐ If this project helped you, please give it a star!
---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 -->



<!-- Platform badges -->



<!-- Social badges -->

markdown
<!-- 状态徽章 -->



<!-- 平台徽章 -->



<!-- 社交徽章 -->

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展示了项目运行状态
□ 列出了所有硬件组件及链接
□ 包含接线图
□ 列出了所有库及版本
□ 分步安装说明
□ 配置部分解释了所有设置
□ 使用方法部分展示了预期输出
□ 故障排除涵盖了常见问题
□ 存在许可证文件
□ 包含联系方式
□ 没有无效链接
□ 检查了拼写/语法