Giter Club home page Giter Club logo

hexaws2811's People

Contributors

raplin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

hexaws2811's Issues

Question Arduino implementation

I try to implement your code in Arduino, by storing the array in PROGMEM and using it to modify pixel values. I use FastLED so my updates are fast (about 1ms for noise, sending pixels and more)

Still I don't get the right effect, so I might still miss something. What happens in the two functions below?

#define fb2color(n,shiftin,shiftout) ((gammaTableDithered[ (n>>shiftin)&0xff ])<<shiftout)
#define adjustRGB(rgb)  (fb2color(rgb,16,0) | fb2color(rgb,8,8) | fb2color(rgb,0,16))

What does do parts fb2color(rgb,16,0) etc. do? Right now the gamma is not stable, but different colors get a different brightness. The primaries (r,b,g) are really bright the other colors not.

I ported your code to Arduino like below. I hope you can help.

for (int i=0; i <NUM_LEDS; i++)
{ 
     CRGB pixel = CHSV(hue,255,noise[i]);

     pixel.r = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.r));
     pixel.g = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.g));
     pixel.b = pgm_read_byte_near(gammaTable + (ditherFrame<<8) + (pixel.b));

     leds[i] = pixel;
}

ditherFrame++;
if(ditherFrame>15) ditherFrame = 0;

FastLED.show();

In this post on the FastLED support site I refer to your code:
https://plus.google.com/100115767703084101160/posts/483GAFbQJiL

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.