ShiftRegister74HC595
ShiftRegister74HC595 copied to clipboard
sr.set(0, HIGH) sets all HIGH
I'm using 3 registers in series and from 1 to 23 I can control them smoothly, but setting the 0 pin HIGH makes it go full HIGH out(even using setAll() to set the bits). I'm using the ESP32 S3 WROOM 1 board at 40 MHz CPU clock.
#include <ShiftRegister74HC595.h>
// Led Control
#define dataPin 21
#define latchPin 20
#define clockPin 19
ShiftRegister74HC595<3> sr(dataPin, clockPin, latchPin);
int ledRED[8] = {0, 1, 2, 3, 4, 5, 6, 7};
int ledGREEN[8] = {8, 9, 10, 11, 12, 13, 14, 15};
int ledBLUE[8] = {16, 17, 18, 19, 20, 21, 22, 23};
void setup() {
Serial.begin(115200);
sr.setAllLow();
}
void loop() {
sr.set(0, HIGH);
delay(200);
sr.set(1, HIGH);
}