You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
your version uses a 8x8 matrix - i used the 7x12 matrix of the arduino mkr rgb shield and i had only problems with the code after your //first row interploation...
your flame is 8 pixles wide, but i wanted a candle-like flame with only 3 pixels at the bottom getting a littel wider. that was olny possible by changing the code to this version:
//first row interpolates with the "next" line
for(unsigned char x = 0; x < M_HEIGHT; x++) {
colorHSV.h = hueMask[0][x];
colorHSV.s = 255;
nextv =
(((100.0-pcnt) * f_matrix[x][0]
+ pcnt * f_line[x])/100.0)
- valueMask[0][x];
colorHSV.v = (unsigned char) max (0, nextv);
HSVtoRGB(&colorRGB, &colorHSV);
setPixel(x, 0, colorRGB.r, colorRGB.g, colorRGB.b);
}
thank you for your very gread code and i hope you like my version as well.
greetings from vienna!
The text was updated successfully, but these errors were encountered:
hi @giladaya ,
i used your code for my little project here
https://create.arduino.cc/projecthub/hatschibratschi/flame-simulation-916431
and i found a bug
your version uses a 8x8 matrix - i used the 7x12 matrix of the arduino mkr rgb shield and i had only problems with the code after your //first row interploation...
your flame is 8 pixles wide, but i wanted a candle-like flame with only 3 pixels at the bottom getting a littel wider. that was olny possible by changing the code to this version:
thank you for your very gread code and i hope you like my version as well.
greetings from vienna!
The text was updated successfully, but these errors were encountered: