20x15 WS2812B led matrix table games

Mine is 20 x 15..I was kinda thinking that..

2 guys have built this table..1 is 10x10 the other is 12x12..surely I can adapt it for a 20 x 15..but then again them extra 5 leds in each could be my problem. Maybe a 15x15 ?

Well it is fixed...the matrix has to be the same amount of leds on each side..the x = FIELD_WIDTH-1 -x;is required for mine to work. I went with the 15x15 matrix. The games are awesome. I want to say thanks to everyone who looked at my post. Also hats off to Grumpy Mike for being the only one that replied and tried to help thank you.

Well done :slight_smile:

Ok, I don't know where this should be posted, so I'm just going to post it here because it is for the game table. I had made a wireless bluetooth dpad controller with start and select button. Everything works for the most part except the right button it double hits all the time. I swapped buttons, pins so I believe it is the code. Any idea where I should be posting this so I can make sure this is the best way for me to do this. Thanks

If it is code put it in the programming section, otherwise in project guidance. Make sure you have at least a block diagram of your setup.

Thank you for the response. My internet was down for a while. I have managed to post my problem about the controller on Project Guidance.

I have become aware of another problem with the table. The leds on Tetris are only lighting up blue and yellow when they should be 6 different colors. Same with the red apple on snake.
When I switch the GRB order to RGB they produce more colors on the game. But I'm pretty sure the WS2812B is GRB. Am I wrong?
Also when I change the color value some colors light up the right color in the Tetris game and some are just making the pieces disappear.

the RGB-GRB code line

 #define COLOR_ORDER GRB
FastLED.addLeds< LED_TYPE, DATA_PIN,COLOR_ORDER>(leds, NUM_PIXELS);

The Color defines

 /* *** LED color table *** */ 
 #define  GREEN     0x008000 
 #define  RED       0xFF6347
 #define  BLUE      0x0000FF 
 #define  YELLOW    0xFFFF00 
 #define  LBLUE     0xADD8E6 
 #define  PURPLE    0x800080
 #define  WHITE     0xFFFFFF 
 unsigned int colorLib[6] = {GREEN, RED, BLUE, YELLOW, LBLUE, PURPLE,};

But I'm pretty sure the WS2812B is GRB. Am I wrong?

It depends on the package. The through hole part is GRB and the surface mount is RGB as I remember.

I have been through every WS2812B data sheet I can find and they all say the WS2812B surface mount is GRB. And the through hole is RGB..I am using the surface mount.

I am using the Adafruit libiary and by default they are the way round I said in reply #42. In the hardware they are swapped, it is just if the software swaps them back for you.

Anyway if all was well then there would just be the wrong colours. Just write a simple test to output all LEDs as red and see where you have to put that data. I see that the single int you are using to define the colours are in RRGGBB format.

Hard to do any fault finding without the full code.

Grumpy_Mike:
I see that the single int you are using to define the colours are in RRGGBB format.

That's is the format for FastLed library that I am using.

Ill write a test to check out the colors.
The full code is attached again as a zip

working_led_table.zip (19.9 KB)

The fastled rgb color test shows that it is GRB

If the color order for this is RRGGBB. Shouldn't I change it to GGRRBB for the GRB color order

 /* *** LED color table *** */ 
 #define  GREEN     0x008000 
 #define  RED       0xFF0000
 #define  BLUE      0x0000FF 
 #define  YELLOW    0xFFFF00 
 #define  LBLUE     0xADD8E6 
 #define  PURPLE    0x800080
 #define  WHITE     0XFFFFFF
#define  RED       0xFF0000

On GRB settings If I change the define for red to 0XFF6347. It lights up orange. If it's 0xFF0000 it is blank. On RGB it's the same way. Also purple 0x800080 is also not lighting up at all on either setting.

I am still having problems with the Colors and the bluetooth controller. So I guess I'm just going to deal with the color issue and try switching the bluetooth to the NRF24L01 modules

i have get some ws2813 led tape,
could I use the ws2812b code for it?

WS2813 LED.pdf (1.14 MB)

Sorry...it's been a while. I have been pretty busy. The code should work, if you have not done it already. If so I would like to see the finished project.

Hi,
is it possible to use a custom Matrix schema?

i wired my 16x16 matrix diagonal zig zag
(to get the right space between the pixels)

See below (but with 16 insteadt of 8 pixels, was to lazy to type all 256 pixels ;-))

01-02-06-07-15-16-28-29
03-05-08-14-17-27-30-43
04-09-13-18-26-31-42-44
10-12-19-25-32-41-45-54
11-20-24-33-40-46-53-55
21-23-34-39-47-52-56-61
22-35-38-48-51-57-60-62
36-37-49-50-58-59-63-64

thanks a lot!
Flo

i wired my 16x16 matrix diagonal zig zag

Well I have never seen that sort of wiring before.

is it possible to use a custom Matrix schema?

Not sure what you are asking here.
Yes you can use it. It’s probably worth working a way to convert Cartesian coordinates to your matrix coordinates.

You can do this in two ways, either with a look up table or by working out an algorithm.