I have a 6x5 Neotrellis panel (so 30 boards) and was wondering if i need to also modify the Adafruit.NeoTrellis.h file to set the
correct addresses and numbers. I modified the regular code to the correct number of addresses and size. Its giving me compile errors so I was wondering that.
#define NEO_TRELLIS_ADDR 0x2E ( I have 30 panels)
#define NEO_TRELLIS_NUM_ROWS 4
#define NEO_TRELLIS_NUM_COLS 4
NeoTrellis board
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15667
- Joined: Tue Oct 20, 2015 3:22 pm
- Surfmob
- Posts: 12
- Joined: Mon Oct 31, 2022 2:51 pm
Re: NeoTrellis board
error: too many initializers for 'Adafruit_NeoTrellis [5][6] This is the error I get. Do I need to change the .h file to increase the matrix size?
- dastels
- Posts: 15667
- Joined: Tue Oct 20, 2015 3:22 pm
Re: NeoTrellis board
Show me the related code.
Dave
Dave
- Surfmob
- Posts: 12
- Joined: Mon Oct 31, 2022 2:51 pm
Re: NeoTrellis board
is it just a syntax error somewhere? I dont see it.
#include "Adafruit_NeoTrellis.h"
#define Y_DIM 20 //number of rows of key 5x4
#define X_DIM 24 //number of columns of keys 6x4
byte CNT = 0;
//create a matrix of trellis panels
Adafruit_NeoTrellis t_array[Y_DIM/4][X_DIM/4] = {
{ Adafruit_NeoTrellis(0x2E), Adafruit_NeoTrellis(0x2F) }, { Adafruit_NeoTrellis(0x30), Adafruit_NeoTrellis(0x31) },
{ Adafruit_NeoTrellis(0x32), Adafruit_NeoTrellis(0x33) }, { Adafruit_NeoTrellis(0x34), Adafruit_NeoTrellis(0x35) },
{ Adafruit_NeoTrellis(0x36), Adafruit_NeoTrellis(0x37) }, { Adafruit_NeoTrellis(0x38), Adafruit_NeoTrellis(0x39) },
{ Adafruit_NeoTrellis(0x3A), Adafruit_NeoTrellis(0x3B) }, { Adafruit_NeoTrellis(0x3C), Adafruit_NeoTrellis(0x3D) },
{ Adafruit_NeoTrellis(0x3E), Adafruit_NeoTrellis(0x3F) }, { Adafruit_NeoTrellis(0x40), Adafruit_NeoTrellis(0x41) },
{ Adafruit_NeoTrellis(0x42), Adafruit_NeoTrellis(0x43) }, { Adafruit_NeoTrellis(0x44), Adafruit_NeoTrellis(0x45) },
{ Adafruit_NeoTrellis(0x46), Adafruit_NeoTrellis(0x47) }, { Adafruit_NeoTrellis(0x48), Adafruit_NeoTrellis(0x49) },
{ Adafruit_NeoTrellis(0x4A), Adafruit_NeoTrellis(0x4B) }
};
//pass this matrix to the multitrellis object
Adafruit_MultiTrellis trellis((Adafruit_NeoTrellis *)t_array, Y_DIM/4, X_DIM/4);
{
#include "Adafruit_NeoTrellis.h"
#define Y_DIM 20 //number of rows of key 5x4
#define X_DIM 24 //number of columns of keys 6x4
byte CNT = 0;
//create a matrix of trellis panels
Adafruit_NeoTrellis t_array[Y_DIM/4][X_DIM/4] = {
{ Adafruit_NeoTrellis(0x2E), Adafruit_NeoTrellis(0x2F) }, { Adafruit_NeoTrellis(0x30), Adafruit_NeoTrellis(0x31) },
{ Adafruit_NeoTrellis(0x32), Adafruit_NeoTrellis(0x33) }, { Adafruit_NeoTrellis(0x34), Adafruit_NeoTrellis(0x35) },
{ Adafruit_NeoTrellis(0x36), Adafruit_NeoTrellis(0x37) }, { Adafruit_NeoTrellis(0x38), Adafruit_NeoTrellis(0x39) },
{ Adafruit_NeoTrellis(0x3A), Adafruit_NeoTrellis(0x3B) }, { Adafruit_NeoTrellis(0x3C), Adafruit_NeoTrellis(0x3D) },
{ Adafruit_NeoTrellis(0x3E), Adafruit_NeoTrellis(0x3F) }, { Adafruit_NeoTrellis(0x40), Adafruit_NeoTrellis(0x41) },
{ Adafruit_NeoTrellis(0x42), Adafruit_NeoTrellis(0x43) }, { Adafruit_NeoTrellis(0x44), Adafruit_NeoTrellis(0x45) },
{ Adafruit_NeoTrellis(0x46), Adafruit_NeoTrellis(0x47) }, { Adafruit_NeoTrellis(0x48), Adafruit_NeoTrellis(0x49) },
{ Adafruit_NeoTrellis(0x4A), Adafruit_NeoTrellis(0x4B) }
};
//pass this matrix to the multitrellis object
Adafruit_MultiTrellis trellis((Adafruit_NeoTrellis *)t_array, Y_DIM/4, X_DIM/4);
{
- dastels
- Posts: 15667
- Joined: Tue Oct 20, 2015 3:22 pm
Re: NeoTrellis board
Your array is a Adafruit_NeoTrellis[5][6] but your initializer is Adafruit_NeoTrellis[15][2].
Dave
Dave
- Surfmob
- Posts: 12
- Joined: Mon Oct 31, 2022 2:51 pm
Re: NeoTrellis board
Ah yes I see that now. Thank you.
Please be positive and constructive with your questions and comments.