Skip to content

Led.Digits not working with my 8-Digit LED Display Segment #969

Closed

Description

I've spent a few hours on this and I can't get my 8-Digit LED Display Module to work. No matter what character I try to draw or print it just prints random illegible characters or nothing.

I purchased my board in China but it works fine with the snippet below. What am I doing wrong?
Is there a way to send arduino code to the board from within the johnny-five project?

// Pin numbers
int rck = 4; // clock
int sck = 3; // cs
int dio = 2; // data

// Binary for 0 to 9
byte num[10]={B11000000, B11111001, B10100100, B10110000,
B10011001, B10010010, B10000010, B11111000, B10000000, B10011000};

// Positions
byte pos[8]={1, 2, 4, 8, 16, 32, 64, 128};

void setup() {
  pinMode(rck, OUTPUT);
  pinMode(sck, OUTPUT);
  pinMode(dio, OUTPUT);
}

void loop() {
  for (int j = 0; j < 8; j++) {
    digitalWrite(rck, LOW);
    shiftOut(dio, sck, MSBFIRST, pos[j]);
    shiftOut(dio, sck, MSBFIRST, num[j]);
    digitalWrite(rck, HIGH);  
    delay(2); // This keeps the flicker above 60 Hz
  }
}

Activity

  1. rwaldron commented on Nov 26, 2015

    @rwaldron
    Owner

    Can you link me to the device you're using (so I can acquire one)?

  2. rwaldron commented on Nov 26, 2015

    @rwaldron
    Owner

    No, that wouldn't be the case. I have several different 8 digit displays that have been tested with Johnny-Five, but not this exact unit. I'll figure out getting one of these, but in the meantime, can you give me two things?

    1. Paste the exact code that's failing
    2. Post a picture of your hardware

    I'll do my best to help you as immediately as possible, but today is a holiday in the US and I will be AFK for the day in about an hour.

  3. rwaldron commented on Nov 26, 2015

    @rwaldron
    Owner

    draw method is for matrix devices (long story about how they all came to have the same backing class). Try this instead:

    display.print("88888888");
  4. rwaldron commented on Nov 26, 2015

    @rwaldron
    Owner

    Also, need better docs :/

  5. rwaldron commented on Nov 26, 2015

    @rwaldron
    Owner

    Strange! I'm AFK now, but I can dig into this tomorrow—sorry for delaying your project :/

  6. dtex commented on Jan 11, 2018

    @dtex
    Collaborator

    Hi @idophir ,

    Johnny-Five contributors and maintainers are loathe to close issues where someone has a need. We don't want anyone to ever feel that we don't care, but we just haven't gotten to this feature yet. Rather than leave it languishing as an open issue we have created a Requested Features page and added your request for the 595 there.

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions