bigjosh / SimpleNeoPixelDemo

A demonstration showing how easy it can be to drive WS2812 NeoPixels
MIT License
223 stars 59 forks source link

Split off header file and improve readme #15

Closed Granjow closed 4 years ago

Granjow commented 4 years ago

This PR updates the Readme to help the user decide when to use this library and when to use NeoPixel, and splits the lbirary from the demo code.

bigjosh commented 4 years ago

Hmm... The readme changes are very helpful. Thanks!

I'm not sure how I feel about breaking out the header file. I think many Arduino people are not C people and do not really understand headers. I like having everything contained in the single INO so when you open it, everything is right there in front of you.

If I was going to break things out into a proper library, then I'd use C++ templates to make it so that you could, say, override the timing #defines with a parameter to the template function and even an abstraction for assigning the pins on different board types.

Maybe making a nice library is a new repo, with this one remaining just the simplest example code? Would you be interested in doing that?

Thoughts?

Thanks again!

Granjow commented 4 years ago

That sounds good, yes! Are you going to create the new repository? I think I can find out how to use C++ templates, some years have passed since I have used C++ regularly, so it is time for a refresher anyway.

Do you have experience with publishing it to the official Arduino library?

bigjosh commented 4 years ago

Do you have experience with publishing it to the official Arduino library? I do not, but I do not think that is critical. It is easy for anyone to install any library these days with just a ZIP file, and it is easy to find libraries with google! :)

Granjow commented 4 years ago

Ok. Will start working on it and also include the timings other users listed in #10!

bigjosh commented 4 years ago

Replaced by #16