首页> 外文期刊>Elektor electronics worldwide >'Knight Rider' LED Chaser with the ESP32
【24h】

'Knight Rider' LED Chaser with the ESP32

机译:'Knight Rider'带有ESP32的LED Chaser

获取原文
获取原文并翻译 | 示例
           

摘要

Knight Rider was a TV action movie featuring a super intelligent car called KITT that talks and self-navigates. The series became immortal due to the light effect on the front of the car, and the associated zoomzoom sound. These lights turn on one by one in one direction, and then in the reverse direction, this movement is repeated continuously. In this little project eight LEDs are connected to the ESP32 DevKitC and the LEDs simulate the Knight Rider car lights. The block diagram of the project is pictured in Figure 1, and the circuit diagram, in Figure 2. The eight LEDs are connected to the GPIO ports through 330-ohm current limiting resistors. The project is easily built on breadboard as shown in Figure 3. The PDL (Project Description Language) of the plan is shown in Listing 1. The program listing of the project is the practical implementation of the PDL. It is very simple and is shown in Listing 2. At the beginning of the program an array called LEDs is set up to store the port numbers of the LEDs used in the project. Then, the GPIO ports that the LEDs are connected to are configured as output ports. Inside the main program two for loops are established. Inside the first for loop the LEDs from MSB to LSB are turned on for 100 ms. Inside the second loop the LEDs from LSB to MSB are turned On for 100 ms. Thus, the net effect is that the LEDs 'chase' each other in both directions.
机译:Knight Rider是一部电视动作电影,包括一辆名为KINT的超级智能车,谈论和自行导航。由于汽车前部的光线效果以及相关的zoomzoom声音,该系列变得不朽。这些灯在一个方向上逐个接一个,然后在反向方向上,连续重复该运动。在这个小项目中,八个LED连接到ESP32 Devkitc,LED模拟骑士骑车者灯。该项目的框图如图1所示,以及图2中的电路图。八个LED通过330欧姆电流限制电阻连接到GPIO端口。该项目很容易在面包板上构建,如图3所示。计划的PDL(项目描述语言)在清单1.项目中显示。该项目的程序列表是PDL的实际实施。它非常简单,并在清单2中示出。在程序的开头,设置了名为LED的数组以存储项目中使用的LED的端口号。然后,LED连接到的GPIO端口被配置为输出端口。建立两个用于循环的主程序内。在第一个for循环中,从MSB到LSB的LED打开100毫秒。在第二个环路内部,LSB到MSB的LED接通100毫秒。因此,净效应是LED在两个方向上彼此追逐“。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号