forked from FastLED/FastLED
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.md
More file actions
292 lines (167 loc) · 16 KB
/
Copy pathREADME.md
File metadata and controls
292 lines (167 loc) · 16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
FastLED
===========
[](https://www.ardu-badge.com/FastLED)
[](https://github.com/FastLED/FastLED/actions/workflows/build.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_unit_test.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/arduino_library_lint.yml)
[](http://fastled.io/docs)
[](https://www.reddit.com/r/FastLED/)
## About
This is a library for easily & efficiently controlling a wide variety of LED chipsets, like the ones
sold by Adafruit (NeoPixel, DotStar, LPD8806), Sparkfun (WS2801), and AliExpress. In addition to writing to the
LEDs, this library also includes a number of functions for high-performing 8-bit math for manipulating
your RGB values, as well as low level classes for abstracting out access to pins and SPI hardware, while
still keeping things as fast as possible.
We have multiple goals with this library:
* Quick start for new developers - hook up your LEDs and go, no need to think about specifics of the LED chipsets being used
* Zero pain switching LED chipsets - you get some new LEDs that the library supports, just change the definition of LEDs you're using, et. voila! Your code is running with the new LEDs.
* High performance - with features like zero cost global brightness scaling, high performance 8-bit math for RGB manipulation, and some of the fastest bit-bang'd SPI support around, FastLED wants to keep as many CPU cycles available for your LED patterns as possible
## Example
*This is an Arduino Sketch that will run on Arduino Uno/Esp32/Raspberri Pi*
```C++
#include <FastLED.h>
#define NUM_LEDS 60
#define DATA_PIN 6
CRGB leds[NUM_LEDS];
void setup() { FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); }
void loop() {
leds[0] = CRGB::White; FastLED.show(); delay(30);
leds[0] = CRGB::Black; FastLED.show(); delay(30);
}
```
For more examples see this [link](examples).
## Supported Platforms
#### Arduino
[](https://github.com/FastLED/FastLED/actions/workflows/build_uno.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_attiny13.yml)
*needs pin definitions for this board*
[](https://github.com/FastLED/FastLED/actions/workflows/build_attiny85.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_attiny1604.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_attiny1616.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_attiny4313.yml)
*needs pin definitions for this board*
[](https://github.com/FastLED/FastLED/actions/workflows/build_yun.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_digix.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_uno_r4_wifif.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_nano_every.yml)
#### Teensy
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensy30.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensy31.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensyLC.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensy40.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensy41.yml)
*Specific Features*
[](https://github.com/FastLED/FastLED/actions/workflows/build_teensy_octo.yml)
#### NRF
[](https://github.com/FastLED/FastLED/actions/workflows/build_adafruit_feather_nrf52840_sense.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_adafruit_xiaoblesense.yml)
#### STM
[](https://github.com/FastLED/FastLED/actions/workflows/build_bluepill.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_maple_map.yml)
#### Raspberry Pi
[](https://github.com/FastLED/FastLED/actions/workflows/build_rp2040.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_rp2350.yml)
#### Esp
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp8622.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32dev.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32wroom.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32c2.yml)
*might work with alternative settings, missing RMT device*
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32c3.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32s3.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32c6.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32h2.yml)
*Specific features*
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32rmt.yml) (prototype 5.1 driver working)
[](https://github.com/FastLED/FastLED/actions/workflows/build_esp32_i2s_ws2812.yml)
Espressif's current evaluation of FastLED's compatibility with their product sheet can be found [here](https://github.com/espressif/arduino-esp32/blob/gh-pages/LIBRARIES_TEST.md)
## x86
[](https://github.com/FastLED/FastLED/actions/workflows/build_linux.yml)
## Compiled Library Size Check
[](https://github.com/FastLED/FastLED/actions/workflows/check_attiny85.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/check_uno_size.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/check_esp32_size.yml)
[](https://github.com/FastLED/FastLED/actions/workflows/check_teensy41_size.yml)
## Getting Started
### Arduino IDE / PlatformIO Dual Repo
We've created a custom repo you can try to start your projects. This repo is designed to be used with VSCode + PlatformIO but is also *backwards compatible with the Arduino IDE*.
PlatformIO is an extension to VSCode and is generally viewed as a much better experience than the Arduino IDE. You get auto completion tools like intellisense and CoPilot and the ability to install tools like crash decoding. Anything you can do in Arduino IDE you can do with PlatformIO.
Get started here:
https://github.com/FastLED/PlatformIO-Starter
### ArduinoIDE
When running the Arduino IDE you need to do the additional installation step of installing FastLED in the global Arduino IDE package manager.
Install the library using either [the .zip file from the latest release](https://github.com/FastLED/FastLED/releases/latest/) or by searching for "FastLED" in the libraries manager of the Arduino IDE. [See the Arduino documentation on how to install libraries for more information.](https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries)
## Development
[](https://github.com/FastLED/FastLED/actions/workflows/build_default.yml)
If you want to make changes to FastLED then please
* [Fork](https://github.com/FastLED/FastLED/fork) the https://github.com/FastLED/FastLED repo into your github account.
* Open up the folder with VSCode.
* Make sure VSCode had the platformio extension.
* Once FastLED is loading with platformio, give it some time to download the dependencies (esp32-s3 (default) has a 1+GB download!)
* Click the platformio compile
* Then upload to your device
* See [dev/dev.ino](dev/dev.ino).
<img width="1220" alt="image" src="https://github.com/user-attachments/assets/66f1832d-3cfb-4633-8af8-e66148bcad1b">
When changes are made then push to your fork to your repo and git will give you a url to trigger a pull request into the master repo.
### Testing other devices
* run [compile](compile) and then select your board
```bash
Available boards:
[0]: uno
[1]: esp32dev
[2]: esp01
[3]: esp32-c3-devkitm-1
[4]: esp32-s3-devkitc-1
[5]: yun
[6]: digix
[7]: teensy30
[8]: teensy41
Enter the number of the board you want to use: 0
```
## Help and Support
If you need help with using the library, please consider visiting the Reddit community at https://reddit.com/r/FastLED. There are thousands of knowledgeable FastLED users in that group and a plethora of solutions in the post history.
If you are looking for documentation on how something in the library works, please see the Doxygen documentation online at http://fastled.io/docs.
If you run into bugs with the library, or if you'd like to request support for a particular platform or LED chipset, please submit an issue at http://fastled.io/issues.
## Supported LED Chipsets
Here's a list of all the LED chipsets are supported. More details on the LED chipsets are included [on our wiki page](https://github.com/FastLED/FastLED/wiki/Chipset-reference)
* Adafruit's DotStars - aka APA102
* Adafruit's Neopixel - aka WS2812B (also WS2811/WS2812/WS2813, also supported in lo-speed mode) - a 3 wire addressable LED chipset
* TM1809/4 - 3 wire chipset, cheaply available on aliexpress.com
* TM1803 - 3 wire chipset, sold by RadioShack
* UCS1903 - another 3 wire LED chipset, cheap
* GW6205 - another 3 wire LED chipset
* LPD8806 - SPI based chipset, very high speed
* WS2801 - SPI based chipset, cheap and widely available
* SM16716 - SPI based chipset
* APA102 - SPI based chipset
* APA102HD - Same as APA102 but with a high definition gamma correction function applied at the driver level.
* P9813 - aka Cool Neon's Total Control Lighting
* DMX - send rgb data out over DMX using Arduino DMX libraries
* SmartMatrix panels - needs the SmartMatrix library (https://github.com/pixelmatix/SmartMatrix)
* LPD6803 - SPI based chpiset, chip CMODE pin must be set to 1 (inside oscillator mode)
HL1606, and "595"-style shift registers are no longer supported by the library. The older Version 1 of the library ("FastSPI_LED") has support for these, but is missing many of the advanced features of current versions and is no longer being maintained.
## Supported Platforms
Right now the library is supported on a variety of arduino compatible platforms. If it's ARM or AVR and uses the arduino software (or a modified version of it to build) then it is likely supported. Note that we have a long list of upcoming platforms to support, so if you don't see what you're looking for here, ask, it may be on the roadmap (or may already be supported). N.B. at the moment we are only supporting the stock compilers that ship with the arduino software. Support for upgraded compilers, as well as using AVR studio and skipping the arduino entirely, should be coming in a near future release.
* Adafruit Trinket & Gemma - Trinket Pro may be supported, but haven't tested to confirm yet
* Arduino & compatibles - straight up Arduino devices, Uno, Duo, Leonardo, Mega, Nano, etc...
* Arduino Due and the digistump DigiX
* Arduino Yún
* Arduino Zero
* AVR microcontrollers - ATtiny, ATmega and more families
* ESP32 based boards
* ESP8266 using the Arduino board definitions from http://arduino.esp8266.com/stable/package_esp8266com_index.json - please be sure to also read https://github.com/FastLED/FastLED/wiki/ESP8266-notes for information specific to the 8266.
* Teensy 2, Teensy++ 2, Teensy 3.0, Teensy 3.1/3.2, Teensy LC, Teensy 3.5, Teensy 3.6, and Teensy 4.0 - arduino compatible from pjrc.com with some extra goodies (note the teensy LC, 3.2, 3.5, 3.6, 4.0 are ARM, not AVR!)
* RFDuino
* SparkCore
* The wino board - http://wino-board.com
What types of platforms are we thinking about supporting in the future? Here's a short list: ChipKit32, Maple, Beagleboard
### Porting FastLED to a new platform
Information on porting FastLED can be found in the file
[PORTING.md](./PORTING.md).
## What about that name?
Wait, what happened to FastSPI_LED and FastSPI_LED2? The library was initially named FastSPI_LED because it was focused on very fast and efficient SPI access. However, since then, the library has expanded to support a number of LED chipsets that don't use SPI, as well as a number of math and utility functions for LED processing across the board. We decided that the name FastLED more accurately represents the totality of what the library provides, everything fast, for LEDs.
## For more information
Check out the official site http://fastled.io for links to documentation, issues, and news
*TODO* - get candy
# About this fork
This fork includes a header file in `src/platforms/avr/fastspi_avr.h` for enabling compatibility with the atmega328pb architecture and therefore with the BQ Educación Zum Core 2.0 board.