Skip to content

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

Description

@Ja1Lopes

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions