Neopixel or Fastled...
 
Notifications
Clear all

Neopixel or Fastled library function or keyword list

5 Posts
3 Users
0 Reactions
378 Views
(@dubbadan)
Member
Joined: 2 years ago
Posts: 24
Topic starter  

Hello. Does anyone have any experience with addressable LEDs and libraries for programming them?

I have started playing with addressable LEDs and have noticed that the most popular libraries for Arduino are Neopixel and Fastled. It has proven surprisingly difficult to find a complete list of functions/keywords for either library. I have found this for Neopixel and for Fastled there is this. Neither seem comprehensive. Perhaps I'm looking in the wrong places?

Cheers, Dan.

Edit: I should clarify that I'm also looking for some idea of what the built-in functions/keywords do, in order to fully utilise the library. I also found this list for Fastled which is not much use.


   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7326
 

@dubbadan I am looking at my Xmas light display right now. I am using the

#include <Adafruit_NeoPixel.h> 
Just hover your mouse over it and rt click then select GoTo Definition. If it doesn't work, navigate to your libraries directory, find the Adafruit_Neopixel folder and in there look at the .h file for all the  functions.
I did the Xmas lights for my wife and just selected the most full example. It does all the displays you can imagine. Have fun.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 5 years ago
Posts: 2045

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7326
 

@dubbadan I just noticed the following

Edit: I should clarify that I'm also looking for some idea of what the built-in functions/keywords do, in order to fully utilise the library. I also found this list for Fastled which is not much use.

Those keywords are for the IDE to colour and format programming elements, NOTHING to do with creating a sketch.

Although I would normally discourage you from 'learning' the as you call them 'functions/keywords' I wanted to err on the side of not seeming to disturb you due to your noobiness as you mentioned earlier on.

It is ok to peruse the header file to see what 'member' functions are mentioned, and to even look at the C++ code to see the implementation BUT if you have no experience (and that takes quite a while as a job, much longer as a hobbyist) it might be frustrating and I don;t want you to be discouraged.The FastLed library is somewhat unusual in the rather than having a single header file it has 31 and 10 C++ files, 99% of libraries have 1.

What I do recommend is to slowly go through the 22 examples. I mean not just look at them, hook your lights up to your Arduino or ESP32 or whatever and run them to see the lighting effects.

If you are concerned about your newness don't be, but if so, send me a private message but you can only receive the after 10 posts so let me know if you want to do that and I will ask the sysadmins to give you PM ability.

The Adafruit_NeoPixel library has only 2 headers, the 2nd is just for the PICO and 4 C++ files, 2 are for the esp and esp8266 specific boards. It has 11 examples and I am using one of them (not sure if I modified it at all) to run one strand of lights around our LR window. It is connected to Alexa so I can have them turn on and off at specific times of day as in x minutes before sundown.

Jump in the water is fine.

 

 

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7326
 

@dubbadan I just realized you may not know how to look at library files, and I tried to post it but it won't go, so here is the file. DO NOT mix this in with your code, if the library ever changes and you have this file in the wrong place you will mess up. Look at it then either delete or at least mangle the name.

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote