Go Down

Topic: LED Sure DE-DP004 Flicker issues (Read 6166 times) previous topic - next topic


Define a DIM pin, then just set it HIGH just prior to shifting out data and LOW immediately when done. Flickering will stop.

Make the following adjustments:

Code: [Select]
digitalWrite(DIM, HIGH);
  int digit1 = seg_codes[num%10];
  int digit10 = seg_codes[num/10];
  shiftOut(dataPin, clockPin, LSBFIRST, digit1);
  shiftOut(dataPin, clockPin, LSBFIRST, digit10);
  digitalWrite(DIM, LOW);

Go Up