Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sr.set(0, HIGH) sets all HIGH #32

Open
Ja1Lopes opened this issue Dec 18, 2023 · 0 comments
Open

sr.set(0, HIGH) sets all HIGH #32

Ja1Lopes opened this issue Dec 18, 2023 · 0 comments

Comments

@Ja1Lopes
Copy link

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);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant