Initial commit

This commit is contained in:
2023-02-09 11:17:03 +01:00
commit 81e507f295
3 changed files with 111 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
#pragma once
#include <Arduino.h>
class ShiftRegister {
public:
ShiftRegister(uint8_t latch, uint8_t clock, uint8_t data, uint8_t numberOfRegister = 1);
~ShiftRegister();
bool writePin(uint8_t pin, uint8_t state);
bool writeByte(uint8_t registerNumber, byte data);
private:
void write();
uint8_t latchPin;
uint8_t clockPin;
uint8_t dataPin;
uint8_t numberOfRegister;
uint8_t numberOfPins;
byte* data;
};