zircothc / DRUM_2004_V1

ESP32 DRUM SYNTH MACHINE
280 stars 7 forks source link

WS2812B 4x4 orientation #5

Closed ivosak closed 5 months ago

ivosak commented 5 months ago

Hi, I have that created, it is amazing! Please, can you share how did you placed that _2 WS2812B 4x4 matrix_es ? Per my calculations there are 32 possible possitions how to place them and I picked one of incorrect one :-) I mean how they are rotated, which is 1st, which 2nd ...

Thanks a lot!

ivosak commented 5 months ago

https://github.com/zircothc/DRUM_2004_V1/assets/36717650/4f99d9ab-dc25-4562-8e81-a0a9ce5488d7

zircothc commented 5 months ago

Hello. When I was taking a photo to my modules to show you how I did it... I open a new bag with modules I remember I bought two weeks ago and they are the same as you got. Capacitors are placed horizontal instead of vertical. Also "WCMU-2812B-16" text has dissapeared. Well, I've just tested and LED layout it is very different. Older are a ziag-zag and newers are not. So we have to do something at code. Its very easy, only we need to change the values of real_led[32] array.

At neopixel configuration you can see:

// Set more friendly led numbers
// 0 to 15 as 16 step, 16 sounds,... and 16 to 23 as selected modes
const byte real_led[32]={ 8, 9,10,11,24,25,26,27,15,14,13,12,31,30,29,28,
                          0, 1, 2, 3,16,17,18,19, 7, 6, 5, 4,23,22,21,20};

Change with:

const byte real_led[32]={ 4, 5, 6, 7,20,21,22,23, 0, 1, 2, 3,16,17,18,19,
                          12,13,14,15,28,29,31,31, 8, 9, 10,11,24,25,26,27};

I didn't test it, only "simple" neopixel example to test layout.

Also, in your video you soldered leds to vbus and gnd pins on esp32 but there are pins to do that marked as "LED" at PCB Orientation is as you can see here: led_orientation

Hope it helps.

ivosak commented 5 months ago

Thanks for code update! I used pins dedicated for led, only used vbus and gnd for external power (batteries), so can run it without power supply :-) Red and black wires you see I am trying to hide under LEDs :-)

Once check new code, will close this ticket. Thank you a lot for your care!

ivosak commented 5 months ago

BTW I think there is small err in your updated code - you have there 31 twice and missing 30...

zircothc commented 5 months ago

Hi. Sorry. ...29,30,31,8,...

ivosak commented 5 months ago

This helps, and now I know, what I am clicking on :-) Thank you!