Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By yiheng
#80483 Hello, I'm trying to make a Adfruit TLC5947 module work with NodeMCU board,
Adfruit_TLC5947 library works fine but it's too slow, so I think hardware spi will be better,
so I typed this after readed TLC5947 spec.,
Code: Select all#include <Arduino.h>
#include <SPI.h>
#define latch   5

void setup() {
  Serial.begin(115200);
  Serial.println("TLC5974 test");
  SPI.begin();
}

void loop() {
  int thisTime = millis();
  uint8_t buffer[36] = {0xFF, 0x0F};
  digitalWrite(latch, 1);
  SPI.beginTransaction(SPISettings(SPI_CLOCK_DIV16,MSBFIRST, SPI_MODE0));
  SPI.writeBytes(buffer, 36);
  digitalWrite(latch, 0);
  Serial.println(millis() - thisTime);
  delay(200);
}


as expected, the first led attached wound light up, but it did not.
what's the right solution? have you some experience? thanks for suggestions.