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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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 aslet s = new SPI(); s.setup();
, but neither work.The options I'm passing to setup are:
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):
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!