I have developed this so far:
#include <Tlc5940.h>
#define NUM_CHNLS 48 // The number of LEDs = 3 TLCs * 16// Column Colour Channels
byte redChannels[16] = {
0 ,1 ,2 ,3 ,4 ,5 ,6 ,7, // TLC1: 0 - 7
16,17,18,19,20,21,22,23}; // TLC2:16-23
byte greenChannels[16] = {
8 ,9 ,10,11,12,13,14,15, // TLC1: 8 - 15
24,25,26,27,28,29,30,31}; // TLC2:24-31
byte blueChannels[16] = {
32,33,34,35,36,37,38,39,
40,41,42,43,44,45,46,47}; // TLC3:32-47
// Row Pins
byte rowPins[8] = {
0,1,2,3,4,5,6,7};int image1R[16][8] = {
0xfff, 0xeff, 0xdff, 0xcff, 0xbff, 0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff,
0xeff, 0xdff, 0xcff, 0xbff, 0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff,
0xdff, 0xcff, 0xbff, 0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff,
0xcff, 0xbff, 0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff, 0xdff,
0xbff, 0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff, 0xdff, 0xcff,
0xaff, 0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff, 0xdff, 0xcff, 0xbff,
0x9ff, 0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff, 0xdff, 0xcff, 0xbff, 0xaff,
0x8ff, 0x7ff, 0x6ff, 0x5ff, 0x4ff, 0x3ff, 0x2ff, 0x1ff, 0xff, 0xfff, 0xeff, 0xdff, 0xcff, 0xbff, 0xaff, 0x9ff};void setup(){
Tlc.init();
for(int i=0; i<8; i++){
pinMode(rowPins*, OUTPUT);*
- }*
}
void loop(){- runImage(redChannels, image1R);*
}
void runImage(byte &colourChannels, int &imageArray){- for(int y=0; y<8; y++){*
- digitalWrite(rowPins[y], HIGH);*
- digitalWrite(rowPins[!y], LOW);*
- for(int i=0; i<16; i++){*
Tlc.set(colourChannels_[y], imageArray*);
}
}
}[/quote]
I created the void runImage() function to scan across the rows and set data for the pixels across the columns from image1R (being the first image set for Red Values)
But I get this error: In function 'void loop()':
error: 'runImage' was not declared in this scope In function 'void runImage(byte&, int&)':
/me*_