编程一个LED灯光秀

在本课中,学生将学习构建电路和编程Arduino以控制电路的基础知识。他们将使用所学知识制作自己的LED灯光秀。
Students will learn the basics of using the Tinkercad Circuits interface to build a simple battery-powered LED circuit. Next, they will learn how to connect an Arduino to the circuit and program it to blink the LEDs. Finally, they will apply what they learned to make their own LED light show. Students will also learn some best practices for building circuits, and how to debug and troubleshoot their circuits and code.

学生将学习使用 Tinkercad Circuits 接口构建简单电池供电 LED 电路的基础知识。接下来,他们将学习如何将 Arduino 连接到电路并对其进行编程以使 LED 闪烁。最后,他们将应用所学知识制作自己的 LED 灯光秀。学生还将学习一些构建电路的最佳实践,以及如何调试和排除电路和代码故障。

学习目标

  • Build a basic LED circuit.  
    构建一个基本的 LED 电路。

  • Connect and program an Arduino to control the circuit. 
    连接 Arduino 并对其进行编程以控制电路。

  • Expand the circuit to add more LEDs. 
    扩展电路以添加更多 LED。

  • Build neat, organized circuits.  
    构建整洁、有序的电路。

  • Troubleshoot when things don't work as expected.
    当事情没有按预期工作时进行故障排除。

LED 闪烁
LED 闪烁

将单个 LED 连接到 Arduino,并使用内置示例代码使其闪烁。

连接 Arduino 和面包板
连接 Arduino 和面包板

设置 Arduino 和试验板,以便准备好开始使用 Arduino 控制 LED。

添加第二个 LED
添加第二个 LED

将第二个 LED 连接到 Arduino,并修改示例代码使其闪烁。

设计你的灯光秀
设计你的灯光秀

设计您自己的 LED 灯光秀。

学习使用寄存器
学习使用寄存器

使用寄存器使单个 LED 闪烁。