TLC59711 four LED control question

Newbie here and a very novice programmer. I am trying to have either a single LED or a pair of LEDs turn on for 3000ms and followed by a 3000ms pause and then the next LED or pair of LEDs. My vain attempt at coding is below. Any help would be greatly appreciated.

#include "Adafruit_TLC59711.h"
#include <SPI.h>

// How many boards do you have chained?
#define NUM_TLC59711 1

#define data 11
#define clock 13

Adafruit_TLC59711 tlc = Adafruit_TLC59711(NUM_TLC59711, clock, data);
//Adafruit_TLC59711 tlc = Adafruit_TLC59711(NUM_TLC59711);

// Set the color of a particular LED

void setup() {
Serial.begin(9600);

Serial.println("TLC59711 test");
pinMode(10, OUTPUT);
tlc.begin();
tlc.write();

}

void loop ()
{

// led sequence

BLU();
BLU_WHT();
BLU_RED();
BLU_GRN();
BLU_YEL();

}

// LED Single pin timing subroutines

void BLU(){tlc.setLED(2,1000, 3000, 7500);delay(3000);tlc.setLED(11,0, 0, 0);delay(3000);}// "Blue"

void RED(){tlc.setLED(2,7500, 0, 0);delay(3000);tlc.setLED(11,0, 0, 0);delay(3000);}// "Red"

void YEL(){tlc.setLED(2,9200, 2800, 0);delay(3000);tlc.setLED(2,0, 0, 0);delay(3000);}// "Yellow"

void GRN(){tlc.setLED(2,0, 7500, 0);delay(3000);tlc.setLED(2,0, 0, 0);delay(3000);}// "Green"

void WHT(){tlc.setLED(2,11500, 8000, 2500);delay(3000);tlc.setLED(2,0, 0, 0);delay(3000);}// "White"

// led pin timing subroutines

void BLU_BLU(){tlc.setLED(1, 1000, 3000, 7500);tlc.setLED(2,1000, 3000, 7500);delay(3000);tlc.setLED(1, 0, 0, 0);delay(3000);}

void BLU_GRN(){tlc.setLED(1, 1000, 3000, 7500);tlc.setLED(2,0, 7500, 0);delay(3000);tlc.setLED(1, 0, 0, 0);delay(3000);}

void BLU_RED(){tlc.setLED(1, 1000, 3000, 7500);tlc.setLED(2,7500, 0, 0);delay(3000);tlc.setLED(1, 0, 0, 0);delay(3000);}

void BLU_WHT(){tlc.setLED(1, 1000, 3000, 7500);tlc.setLED(2,11500, 8000, 2500);delay(3000);tlc.setLED(1, 0, 0, 0);delay(3000);}

void BLU_YEL(){tlc.setLED(1, 1000, 3000, 7500);tlc.setLED(2,9200, 2800, 0);delay(3000);tlc.setLED(1, 0, 0, 0);delay(3000);}

void setLED(uint8_t lednum, uint16_t r, uint16_t g, uint16_t b);

What does that (atrociously organized) code actually do? How does that differ from what you want?

PaulS:
What does that (atrociously organized) code actually do? How does that differ from what you want?

lol. I guess it wasn't necessary for me to explicitly state that I am not a programmer. The…uhmmmm…code? is prologue :slight_smile:

My goal is to define the color of each of four LEDs separately and call them singly or in pairs. It compiles and uploads but no joy (no surprise there) on the output. Nothing but inky blackness from the LEDs.

The wiring checks out as the sample scripts that are downloadable from Adafruit work.

I am open to any and all suggestions or pointers to tutorials.

My goal is to define the color of each of four LEDs separately

Those 4 LEDs being 1, 2, and 11?

Each TLC59711 can control 8 LEDs, so the numbers should be between 0 and 7.

Once you have set the color of each of the LEDs that are to be set, you need to write the data to the chip. The example does that. Your code does not.

PaulS:
Those 4 LEDs being 1, 2, and 11?

Each TLC59711 can control 8 LEDs, so the numbers should be between 0 and 7.

Once you have set the color of each of the LEDs that are to be set, you need to write the data to the chip. The example does that. Your code does not.

Very good to know. As you deduced, I was approaching the problem as if the Arduino had continuous two-way communications to the chip controlling each step along the way. Thank you for the feedback. I will change my general assumptions, review the example again, and give the code another crack.

Thank you for the response.