• Hi - which Espruino board are you using? I'm pretty sure the 3rd pin won't be right (that's usually the 3.3v pin) - I think if you do that you could cause some serious damage!

    I'd also make sure that GND of all boards is connected together - it can often be a big cause of problems if that isn't connected.

    In terms of software, what you're doing looks good. The latch is often active low though, so I'd try:

        digitalWrite(LATCH_PIN,0);
        displayPixel(aff%5, Math.floor(aff/5)%7, compteur%2);
        digitalWrite(LATCH_PIN,1);
    

    Or potentially the problem is that digitalPulse is asyncronous? It will be working while you are writing data using displayPixel. I'm not sure if that's your intention? If not:

        digitalPulse(LATCH_PIN,1,1);
        setTimeout(function() {
          displayPixel(aff%5, Math.floor(aff/5)%7, compteur%2);
        }, 2);
    

    Might help?

    Also, I believe there are some issues with shiftOut:

    You could try this?

    shiftOut(DATA_PIN, {clk:CLOCK_PIN, repeat:8}, [E.reverseByte(data)]);
    

    Or, as @allObjects says, you can use the SPI object. But you'll still need reverseByte

About

Avatar for Gordon @Gordon started