Closed jacobrejin closed 4 years ago
uint8_t frameBuffer[360]; uint8_t frameBuffer2[320];
void visInit() { // Set output channel/pin, GPIO_PIN_0 = 0, for GPIO_PIN_5 = 5 - this has to correspond to WS2812B_PINS ws2812b.item[0].channel = 0; // Your RGB framebuffer ws2812b.item[0].frameBufferPointer = frameBuffer; // RAW size of framebuffer ws2812b.item[0].frameBufferSize = sizeof(frameBuffer);
// If you need more parallel LED strips, increase the WS2812_BUFFER_COUNT value
ws2812b.item[1].channel = 3;
ws2812b.item[1].frameBufferPointer = frameBuffer2;
ws2812b.item[1].frameBufferSize = sizeof(frameBuffer2);
ws2812b_init();
}
what is used to determine the size of framebuffer2? ws2812b.item[0].channel = 0; what is this?
uint8_t frameBuffer2[320]; I have not used this code for years. 320 bytes seems weird because it is not dividible by three (RGB per pixel). Not sure if it works because of luck, or because I forgot why I choosed that number. uint8_t frameBuffer[360]; 360 bytes / 3 = 120 LEDs seems fine
If you still have issues, send me your project. I don't have F103 but the code can show something, or I reflash some of Discovery kits ST-link MCUs.
ws2812b.item[0].channel = 0; what is this?
this relates to
and defines that first WS2812B driver channel is mapped to GPIOC and port0 - PC0
Ok I'll sent u the project.
U have defined only these ws2812b.item[0].channel=0; ws2812b.item[0].channel=3;
ie. Only PC0 and PC3 what about 1,2 pins of port C
What if I have to se use some random ports. ie 2,5,6. Had one silly doubt. Does the ports defined in parallel produce different or same signals
And there were some commented section in ws2812b.c Should I un-comment it?
void DMA1_Channel2_IRQHandler(void) void DMA1_Channel5_IRQHandler(void)
This section is commented out . I should un-comment it right?
This is what I am trying to achieve. im using Your DMA implementation and trying to use it as Ws2811Octo library(mostly the Live Video streaming, The SD card Video loading and using multiple controller part) there is a lot of work to be done!!!!