feat: 全量同步 254 个常用的 Arduino 扩展库文件

This commit is contained in:
yczpf2019
2026-01-24 16:05:38 +08:00
parent c665ba662b
commit 397b9a23a3
6878 changed files with 2732224 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
#ifndef LEDbar_h
#define LEDbar_h
#include "Arduino.h"
class LEDbar
{
public:
// Constructor without dim pin
LEDbar(uint8_t clk, uint8_t data);
// Pass the number of LEDs
void begin(uint8_t numberOfLEDs);
// Clear the LED bar
void clear();
// Turn on all LEDs
void all();
// Set n dots from position x
void setDots(uint8_t position, uint8_t dots);
// Turn on n leds from start position. Use negative numbers to start from the other end
void setLevel(int8_t level);
// Set a repeating pattern, 8 bit standard
void setPattern(uint64_t pattern, uint8_t length = 8);
private:
// Latch bit
void strobe(bool dataIn);
/* Provate variables */
uint8_t _clk;
uint8_t _data;
uint8_t _numberOfLEDs;
};
#endif