• I've been trying to light a few LEDs using the above shift register without success. I'm having to translate from Arduino guides to Espruino/Puck.js, so undoubtedly I've got something wrong.

    I've tried using SPI1.setup() as well as let s = new SPI(); s.setup();, but neither work.

    The options I'm passing to setup are:

      let options = {
        sck: PINS.CLOCK,
        // miso: PINS.LATCH,
        mosi: PINS.DATA,
        order: 'lsb',
        mode: 0,
      };
    

    And I've tried using s.write([0, 1, 0, 0, 0, 0, 0, 0], PINS.LATCH) as well as manually setting the latch low/high around the write.

    Wiring is as follows (the comment is the pin number on the shift register itself):

    const PINS = {
      DATA: D28, // 14
      LATCH: D29, // 12
      CLOCK: D30, // 11
    };
    

    And finally, I've supplied power and ground where required (I think!), at pin 1 for ground, and pins 10 (SRCLR) and 16 (VCC) are high.

    Absolutely any help at all will be massively appreciated. Thanks!

About

Avatar for Drarok @Drarok started