Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to realize the effect of breath Lamp by Software in Internet

Shulou Source: shulou.com Published: 2022-06-01 07:29:13 10月03日 Update

This article mainly introduces how the software in the Internet to achieve the effect of breathing lights, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

The software realizes the effect of breath lamp static void doLedItem (int needB, int needL) {int ib = 0 il = 0 position while (il)

< needL) {if (ib * needL < il * needB) { ib++; api_led_BT(0); }else { il++; api_led_BT(1); } app_sched_execute(); }}#define LED_STEP 400static void doLED(int count, int type) {int v = 0;if (type == 0) {//警告灯效果while (--count >

= 0) {for (int I = 0; I

< LED_STEP; i++) { doLedItem(i + 10, LED_STEP - i + 10); } } }else {//呼吸灯效果while (--count >

= 0) {for (int I = 0; I < LED_STEP; I +) {doLedItem (I + 10, LED_STEP-I + 10);} for (int I = 0; I < LED_STEP; I +) {doLedItem (LED_STEP-I + 10, I + 10);}} api_led_BT (0) } Thank you for reading this article carefully. I hope the article "how to achieve the effect of breathing lights on the Internet" shared by the editor will be helpful to everyone. At the same time, I also hope that you will support and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Effects articles software Internet Internet value interest at the same time more friends knowledge editing industry information information channels channels references learning help support Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Huawei vpn MariaDB Shulou Technology