The question is how to make effect like on this video: http://www.youtube.com/watch?v=INkkM8y4 ... age#t=122s (like chaothic moving sparkles that push each other and birth new sparkles)?
Thanx!
Moderators: adafruit_support_bill, adafruit
pounce wrote:Do you have enough programming knowledge to understand how to send data to the strip to light a specific pixel/LED?
I think you should experiment with lighting single lights to the color you want using code. Doing this will give you the understanding on how to make the light move.
// Set pixel color from separate 7-bit R, G, B components:
void LPD8806::setPixelColor(uint16_t n, uint8_t r, uint8_t g, uint8_t b) {
if(n < numLEDs) { // Arrays are 0-indexed, thus NOT '<='
uint8_t *p = &pixels[n * 3];
*p++ = g | 0x80; // LPD8806 color order is GRB,
*p++ = r | 0x80; // not the more common RGB,
*p++ = b | 0x80; // so the order here is intentional; don't "fix"
}
}
// Set pixel color from 'packed' 32-bit RGB value:
void LPD8806::setPixelColor(uint16_t n, uint32_t c) {
if(n < numLEDs) { // Arrays are 0-indexed, thus NOT '<='
uint8_t *p = &pixels[n * 3];
*p++ = (c >> 16) | 0x80;
*p++ = (c >> 8) | 0x80;
*p++ = c | 0x80;
}
}
Return to Glowy things (LCD, LED, TFT, EL) purchased at Adafruit
Users browsing this forum: No registered users and 6 guests