跳到主要内容
版本:2026 Peyvand Academy 活动

IoT 硬件 · 学生讲义

用 Claude 打造三个玩具

向名叫 Claude 的 AI 描述你想要的玩具,然后用 Makey Makey 板来玩它们。

你需要准备

  • 一台有浏览器的笔记本电脑。
  • 免费 Claude 账号:打开 claude.ai 并登录。应用会出现在预览面板(Artifact)里。
  • 稍后:Makey Makey 板、鳄鱼夹,以及香蕉、铝箔或橡皮泥。

三步流程

  1. 打开 claude.ai,粘贴下面的提示词。
  2. 在预览面板里用键盘玩玩具。
  3. 夹上香蕉,把它变成你的作品。

Makey Makey 键位对照

键盘按键触摸这里
Space(空格)正面:Space 垫
↑ ↓ ← →正面:方向键垫
W A S D F G板子背面

Makey Makey 假装是键盘,所以摸香蕉等于按键。代码完全不用改。

发挥创意

  • 让 Claude 改音效或颜色。
  • 把接水果游戏变成香蕉摇杆。
  • 加高分榜或双人模式。

三条提示词(请复制英文原文)

1 · 香蕉钢琴 · 简单

Make a fun web-page piano. When I press Space, the arrow keys, or W A S D F G, play a different musical note and flash a big colourful button for that key. Make it work with a normal keyboard.

2 · 记忆游戏 · 中等

Make a memory game like Simon Says. Show four big coloured pads for the Up, Down, Left and Right arrow keys, each with its own sound. Flash a sequence of pads that gets one longer each round, and I repeat it with the arrow keys. Show the round number, and say game over if I press the wrong one. Make it work with a normal keyboard.

3 · 接水果游戏 · 挑战

Make a simple web game. Good fruit and bombs fall from the top. I move a basket with the Left and Right arrow keys to catch the fruit for points but dodge the bombs. Catching a bomb costs a life, and the game speeds up over time. Show the score and lives. Make it work with a normal keyboard.

安全: 只用食物、铝箔和橡皮泥。握住金属 Earth 条电路才通。切勿连接市电。

附加可玩(今天不要求搭建): 用 Claude 专业工具、一句提示词做出的完整像素风 Super Mario 关卡。同样用方向键、Space 和点击,Makey Makey 也能驱动——点此游玩


教程:触摸世界,对话编程 · Chan Meng · chanmeng.org