初始化提交

This commit is contained in:
王立帮
2024-07-20 22:09:06 +08:00
commit c247dd07a6
6876 changed files with 2743096 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
#include <SoftPWM.h>
#define DELAY 100
uint8_t leds[8] = {22, 23, 26, 27, 28, 29, 30, 31};
void setup()
{
SoftPWMBegin();
for (int i = 0; i < 8; i++)
SoftPWMSet(leds[i], 0);
SoftPWMSetFadeTime(ALL, 50, 400);
}
void loop()
{
uint8_t pin = random(8);
SoftPWMSet(leds[pin], 255);
delay(50);
SoftPWMSet(leds[pin], 0);
delay(random(DELAY));
}