8RzJJs

Heart-shaped lights

 
Overview
This project is a heart-shaped lamp made based on the air32f103cct6 microcontroller. It includes a power supply circuit, a crystal oscillator circuit, a reset circuit, and a microcontroller circuit. The code was written to achieve the effects of all LEDs on, all LEDs off, and a running light effect.
 
int main(){ SysTick_Init(72); // Delay function initialization LED_Init(); // Initialize the hardware interface connected to the LED LED_Init_B(); // Initialize the hardware interface connected to the LED LED_Init_A(); // Initialize the hardware interface connected to the LED LED_Init_B1(); LED_Init_A1(); while(1) { siliangsimie();//All on liangliangliangmie();//All off yiliangyimie();//Move from left to right liangbianliudo();//Move to both sides liangmie();//The colored lights light up sequentially from left to right, and then turn off sequentially liangbuanliang();//Both sides light up and turn off simultaneously liangliangliangmie();//All off
    } }
The above is the main function code.
                                                                  Figure 1: Circuit diagram
                       Figure 2: Circuit diagram Demonstration effect
The attached code and demonstration video have been uploaded.
 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2026-03-28 23:35:29

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号