微光黑客松

Sailing Tactics

让小朋友通过硬件互动了解帆船赛战术规则 · Sailing Tactics Hardware

by 大灰狼

白天不懂夜的黑 — Sailing Tactics

Logo

让小朋友通过硬件互动了解帆船赛战术规则
A hardware game that teaches kids the rules of sailing regattas through hands-on interaction.

Project Link Program Status


项目简介

这是一个帆船战术游戏硬件设备——让小朋友通过真实的硬件互动,直观地理解帆船赛(Regatta)的规则。

项目核心是一艘3D 打印的帆船模型,搭配一个实体控制器(旋钮 + 按钮 + LED 指示灯),通过嵌入式 C++ 程序与手机 App 联动,让孩子在"玩"的过程中掌握帆船战术知识。

🎯 目标用户:对帆船运动好奇的小朋友
🎮 互动方式:转动旋钮模拟风向角 → LED 反馈当前状态 → App 显示战术建议


✨ 功能亮点

功能 描述
🕹️ 旋钮角度检测 旋转旋钮模拟帆船与风向的夹角,角度 > 10° 触发状态切换
💡 LED 视觉反馈 粉色呼吸灯(待机)→ 蓝白色(按钮触发 / 角度超限)
📱 App 联动 控制器通过蓝牙 / WiFi 连接手机 App,实时显示战术建议
🛠️ 3D 打印船模 Onshape 设计,snap-fit 卡扣连接,免工具组装
🔊 按钮交互 切换模式 / 重置状态,带清晰 LED 提示

🛠️ 技术栈

类别 工具 / 技术
建模 Onshape(云端 CAD,支持中文界面)
制造 3D 打印(FDM),最初尝试激光切割,后改为 3D 打印
编程 C++(嵌入式开发,Arduino 框架)
硬件 旋钮(旋转角度检测)、按钮 × 2、LED × 4(粉 / 蓝 / 绿 / 白)
连接 控制器 ↔ 手机 App(蓝牙串口)
记录 每小时录音日志,全程追踪开发进度

📷 项目图片

3D 船模渲染图 硬件控制器
Boat Model Controller
Onshape 设计 · Snap-fit 卡扣 · 1:8 比例 C++ 嵌入式 · LED 反馈 · 旋钮角度检测
整机装配图 App 连接演示
Assembly App Demo
Onshape Mates 装配 · Daggerboard 设计 控制器与 App 通信 · 实时角度显示

📊 进展时间线

日期 累计时长 主要进展
5/20 1.0h 注册 Slack,设计第一个舵模型,首次 3D 打印
5/21 2.2h 修复 3D 模型问题,优化外观,使其更逼真
5/22 3.9h 从激光切割改为 3D 打印,设计 snap-fit 卡扣连接船帆与船体
5/23 5.5h 加入 daggerboard 和按钮,Onshape 整机装配(Mates)
5/27 6.8h 齿轮加齿,daggerboard 加厚,简化锁定机构
5/28 7.8h 组装船模,学会 Onshape 动画(左右倾斜效果)
5/29 9.2h 优化天线走线,调整旋钮位置,舵增加曲线细节
5/31 10.6h 优化线材走线,加入船舱结构,隐藏走线更美观
6/1 上午 12.0h 迭代船舱设计,修复舵打印失败问题
6/1 下午 13.1h 学习 C++ 逻辑,实现按钮控制 LED 红/蓝切换
6/3 14.7h 实现旋钮角度 > 10° 切换粉色 LED 功能
6/4 15.6h 实现粉色呼吸 LED + 按钮触发蓝白切换完整逻辑
6/7 上午 17.3h 实现控制器与 App 连接,可直接联动
6/7 下午 18.9h 打印 4 套船模,代码接近完成
6/8 20.6h 代码基本完成,控制器响应优秀,LED 指示清晰 ✅

📝 开发日志


🚀 如何运行

硬件

  1. 将代码烧录至 Arduino / ESP32 开发板
  2. 连接旋钮(模拟输入)、按钮(数字输入)、LED(PWM 输出)
  3. 通电,LED 开始粉色呼吸

软件

  1. 打开 Onshape 项目,导出 STL 文件
  2. 切片后 3D 打印船体各部件
  3. 按 snap-fit 卡扣组装,无需胶水

App 连接

  1. 手机安装配套 App(蓝牙串口)
  2. 控制器上电后自动广播,App 点击连接
  3. 转动旋钮,App 实时显示角度和战术建议

💡 下一步计划

  • <input disabled="" type="checkbox"> 优化 App 端 UI,增加帆船战术规则动画演示
  • <input disabled="" type="checkbox"> 增加声音反馈(蜂鸣器),增强互动体验
  • <input disabled="" type="checkbox"> 制作教学卡片,配套帆船规则图解
  • <input disabled="" type="checkbox"> 邀请小朋友实测,收集反馈并迭代

👩💻 作者

emilyguoer @ 微光舰队 2026

如果这个项目对你有启发,欢迎在 YESHENG 上给我留言!🌟


README 最后更新:2026-06-08

更新记录

  1. 日志 1

    I did some further programming today and the code is now largely complete. The project is fully functional, with excellent control responsiveness when connected to the app, along with clear LED indicator cues for the buttons. Additionally, I successfully printed two finalized boat models.

    今天继续完善程序,代码现已基本完成。项目功能完整,连接到 App 后控制器响应非常出色,按钮的 LED 指示也很清晰。此外,我成功打印了两套最终版船模。

    📷 图片

    日志 1

  2. 日志 2

    This afternoon, I worked on the programming and successfully implemented the connection between my controller and our app. It can now link directly to the application.

    今天下午,我做了一些编程工作,成功实现了控制器与 App 的连接。现在可以直接连接到应用程序了。

    📷 图片

    日志 2

  3. 日志 3

    Today I refined the rudder dimensions for a closer, more seamless fit. I've successfully printed four full sets of the boat models. Meanwhile, I kept working on my programming, making sure to understand the purpose of each individual command. The project is nearly complete.

    今天我优化了舵的尺寸,使其更贴合、更无缝。我已成功打印了四套完整的船模。同时,我继续钻研编程,确保理解每一条指令的用途。项目已接近完成。

    📷 图片

    日志 3

  4. 日志 4

    I kept working on my programming today and built a new project. The general logic involves a pink breathing LED; pressing the button triggers it to switch to a cool white-blue color. If the knob's rotation angle then exceeds 10 degrees, it reverts to pink. Successfully implemented it! It's super fun and highly rewarding.

    今天继续编程,建立了一个新项目。整体逻辑是:粉色呼吸 LED;按下按钮触发切换为酷蓝白色;如果旋钮旋转角度超过 10 度,则恢复为粉色。成功实现!超级有趣,很有成就感。

    📷 图片

    日志 4

  5. 日志 5

    I worked on some programming today and made a slight adjustment to the code. I successfully implemented a feature: when the knob's rotation angle exceeds 10 degrees, the color switches to pink. It works beautifully!

    今天做了一些编程工作,对代码做了小幅调整。成功实现了一个功能:当旋钮旋转角度超过 10 度时,颜色切换为粉色。效果非常棒!

    📷 图片

    日志 5

  6. 日志 6

    This evening, I took a quick look at basic C++ program logic and wrote a simple program to practice. The control logic is: holding down the button triggers a red light/display, and when left unpressed, it reverts to blue.

    今天晚上,我快速浏览了 C++ 基础编程逻辑,并写了一个简单程序来练习。控制逻辑是:按住按钮触发红色灯光/显示,松开后恢复为蓝色。

    📷 图片

    日志 6

  7. 日志 7

    Today, I optimized the little boat again. I made a new version of the cabin, but it didn't turn out as good as the previous one, so I decided not to use it. I also improved the rudder—part of it failed to print yesterday.

    今天,我再次优化了小船。我做了一个新版本的船舱,但效果不如之前的那个,所以我决定不使用它。我还改进了舵——昨天有一部分打印失败了。

    📷 图片

    日志 7

  8. 日志 8

    Today I refined the cable routing from yesterday's design and integrated a cabin structure over it for a more concealed and aesthetic look. Additionally, I modified the knob placement.

    今天,我优化了昨天设计中的线材走线,并在其上方整合了一个船舱结构,使外观更隐蔽、更美观。此外,我调整了旋钮的位置。

    📷 图片

    日志 8

  9. 日志 9

    Today I optimized the antenna cable routing for a cleaner aesthetic, without compromising the boat's handling and responsiveness during operation. Additionally, I shifted the knob location forward, scaled up the rudder tiller slightly, and incorporated curved details onto the rudder design.

    今天我优化了天线线缆走线,使外观更整洁美观,同时不影响船只操作时的操控性和响应性。此外,我将旋钮位置前移,稍微放大了舵柄,并在舵的设计中加入了曲线细节。

    📷 图片

    日志 9

  10. 日志 10

    Today I assembled the boat model, identified some issues, and corrected them on the spot. I successfully learned how to animate it to tilt left and right. However, I haven't mastered controlling the specific direction of the oscillation just yet.

    今天我组装了船模,发现了一些问题,并当场进行了修正。我成功学会了如何让船模动画左右倾斜。不过,我还没有完全掌握控制摆动具体方向的方法。

    📷 图片

    日志 10

  11. 日志 11

    Today, I adjusted the gear design, giving it proper teeth instead of leaving it as a blank cylinder. I also thickened the daggerboard and eliminated the previous mechanism. I realized that the friction alone is more than enough to hold the daggerboard firmly in place, making the extra mechanism unnecessary.

    今天,我调整了齿轮设计,给它加上了真正的齿,而不是留一个空白圆柱体。我还加厚了稳向板(daggerboard),并去掉了之前的锁定机构。我意识到仅靠摩擦力就足以将稳向板牢牢固定,额外的机构是多余的。

    📷 图片

    日志 11

  12. 日志 12

    Today, I continued with the model optimization from yesterday and integrated a daggerboard and a button into the design. I also assembled all the components in Onshape using mates, and the final assembly turned out fantastic!

    今天,我继续昨天的模型优化,在设计里整合了稳向板(daggerboard)和一个按钮。我还在 Onshape 中使用 Mates 装配了所有部件,最终装配效果非常棒!

    📷 图片

    日志 12

  13. 日志 13

    I worked on my boat model today and made some optimizations. I switched from laser cutting to 3D printing this time. My main focus was designing a snap-fit joint to connect the sail to the hull. It turned out great!

    今天我继续完善船模,做了一些优化。这次我从激光切割改为 3D 打印。我的重点是设计一个 snap-fit 卡扣,用来连接船帆和船体。效果非常棒!

    📷 图片

    日志 13

  14. 日志 14

    I reviewed yesterday's 3D model and noticed a few issues. I've fixed them and optimized the model to make it look much more realistic. It's printing right now!

    我检查了昨天的 3D 模型,发现了几个问题。我已经修复了它们,并优化了模型,使它看起来更逼真。现在正在打印中!

    📷 图片

    日志 14

  15. 日志 15

    I designed a very basic 3D model to use as a rudder for a sailboat in my game. It doesn't have any curved surfaces yet, so it's not much to look at, but I can use it to test the scale. I'm leaving it to 3D print overnight.

    我设计了一个非常基础的 3D 模型,用作游戏中帆船的舵。它还没有任何曲面,所以没什么好看的,但我可以用它来测试比例。我把它留着通宵 3D 打印。

    📷 图片

    日志 15

  16. 日志 16

    I just start today. I see the video, I figured out how to use the APP and what I will do. I also registered for Slack.

    今天刚刚开始。我看了视频,弄明白了怎么用这个 App,以及我要做什么。我还注册了 Slack。

    📷 图片

    日志 16