讨论

Arduino双轴太阳能追踪器代码生成器

来自 Wikiprompt,自由的提示词百科全书

Coin Shot ☁️

2026年5月29日

Arduino双轴太阳能追踪器代码生成器 用于生成双轴太阳能追踪器Arduino代码的提示,使用LDR传感器和舵机,并指定引脚分配和控制逻辑。

提示词内容收藏

🌐
Write me an Arduino sketch for a dual-axis solar tracker. Hardware: 4 LDRs on pins A0, A1, A2, and A3. A0 is top-left. A1 is top-right. A2 is bottom-left. A3 is bottom-right. 1 horizontal servo on pin 9. 1 vertical servo on pin 10. Logic: Average top vs bottom LDRs. Tilt the vertical servo toward the brighter side. Average left vs right LDRs. Rotate the horizontal servo toward the brighter side. Add a small tolerance so the servos don't jitter. Constrain horizontal servo between 10 and 170 degrees. Constrain vertical servo between 10 and 80 degrees. Output one complete sketch I can paste into Arduino IDE.

登录以查看完整提示词

继续使用:

登录即表示你同意我们的 使用条款 和 隐私政策

用法

此提示词专为 coding 设计。复制上方内容并粘贴到你常用的 AI 工具中。

为获得最佳效果,可将占位符(方括号或大写字母标示)替换为你的具体需求。

参考资料

分类:coding| twitter| arduino| solar-tracker

讨论