Skip to content

Commit 9202142

Browse files
committed
Rename library
1 parent 58f1106 commit 9202142

File tree

13 files changed

+143
-143
lines changed

13 files changed

+143
-143
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Stephan Rumswinkel
3+
Copyright (c) 2022 Stephan Rumswinkel
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# FastLEDManager
1+
# FastLEDHub
22

3-
<!--[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/stnkl/EverythingToolbar/blob/master/LICENSE)-->
3+
[![arduino-library-badge](https://www.ardu-badge.com/badge/FastLEDHub.svg?)](https://www.ardu-badge.com/FastLEDHub)
4+
[![MIT license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/stnkl/EverythingToolbar/blob/master/LICENSE)
45

5-
FastLEDManager allows you to manage all of your [FastLED]([FastLED](https://github.com/FastLED/FastLED)) sketches on the ESP8266 with minimal changes to your existing code. FastLEDManager is compatible with most of the demo sketches at [atuline/FastLED-Demos](https://github.com/atuline/FastLED-Demos). It requires little knowledge about the ESP8266 platform making in an ideal playground for beginners getting started with FastLED animations.
6+
FastLEDHub allows you to manage all of your [FastLED]([FastLED](https://github.com/FastLED/FastLED)) sketches on the ESP8266 with minimal changes to your existing code. FastLEDHub is compatible with most of the demo sketches at [atuline/FastLED-Demos](https://github.com/atuline/FastLED-Demos). It requires little knowledge about the ESP8266 platform making in an ideal playground for beginners getting started with FastLED animations.
67

78
## Features
89

@@ -17,7 +18,7 @@ FastLEDManager allows you to manage all of your [FastLED]([FastLED](https://gith
1718

1819
## Web interface
1920

20-
![FastLEDManager web app screenshot](screenshots/screenshot.png "FastLED Manager web app")
21+
![FastLEDHub web app screenshot](screenshots/screenshot.png "FastLEDHub web app")
2122

2223
## Installation
2324

@@ -34,43 +35,43 @@ FastLEDManager allows you to manage all of your [FastLED]([FastLED](https://gith
3435
### Official releases via the Arduino IDE v1.8+
3536
1. Open the Arduino IDE
3637
2. Navigate to _"Sketch"_ &#8594; _"Include Library"_ &#8594; _"Manage Libraries..."_
37-
3. Search for `FastLEDManager` and install the desired version
38+
3. Search for `FastLEDHub` and install the desired version
3839
-->
3940

4041
### Manual Installation
4142

4243
1. Make sure you have installed the dependencies above
43-
2. Download the desired version from the [releases](https://github.com/stnkl/FastLEDManager/releases) page
44+
2. Download the desired version from the [releases](https://github.com/stnkl/FastLEDHub/releases) page
4445
3. Extract the contents of the downloaded zip file
45-
4. Rename the extracted folder to `FastLEDManager`
46+
4. Rename the extracted folder to `FastLEDHub`
4647
5. Move this folder to your libraries directory `~/Arduino/libraries`)
4748
6. Restart your Arduino IDE
4849

4950
### Using Git
5051

5152
```bash
5253
cd ~/Arduino/libraries
53-
git clone https://github.com/stnkl/FastLEDManager.git
54+
git clone https://github.com/stnkl/FastLEDHub.git
5455
```
5556

5657
To update to the latest version of the library
5758

5859
```bash
59-
cd ~/Arduino/libraries/FastLEDManager && git pull
60+
cd ~/Arduino/libraries/FastLEDHub && git pull
6061
```
6162

6263
## Usage
6364

64-
Using FastLEDManager to manage your FastLED animations requires mainly three steps:
65+
Using FastLEDHub to manage your FastLED animations requires mainly three steps:
6566

66-
- Creating the main sketch to initialize your lightstrip with FastLEDManager
67-
- Creating an animation or modifying an existing sketch to be compatible with FastLEDManager
67+
- Creating the main sketch to initialize your lightstrip with FastLEDHub
68+
- Creating an animation or modifying an existing sketch to be compatible with FastLEDHub
6869
- Registering your animations in the main sketch
6970

7071
### Creating the main sketch
7172

7273
```cpp
73-
#include <FastLEDManager.h>
74+
#include <FastLEDHub.h>
7475
#include <ESPEssentials.h>
7576

7677
#define NUM_LEDS 6
@@ -79,17 +80,17 @@ Using FastLEDManager to manage your FastLED animations requires mainly three ste
7980

8081
void setup()
8182
{
82-
FastLEDManager.initialize("Project Name", NUM_LEDS);
83-
FastLEDManager.addLeds<LED_TYPE, LIGHTSTRIP_PIN, GRB>(FastLEDManager.hardwareLeds, NUM_LEDS);
83+
FastLEDHub.initialize("Project Name", NUM_LEDS);
84+
FastLEDHub.addLeds<LED_TYPE, LIGHTSTRIP_PIN, GRB>(FastLEDHub.hardwareLeds, NUM_LEDS);
8485
}
8586

8687
void loop()
8788
{
88-
FastLEDManager.handle();
89+
FastLEDHub.handle();
8990
}
9091
```
9192

92-
Change `NUM_LEDS`, `LED_TYPE` and `LIGHTSTRIP_PIN` according to your hardware configuration. You may notice that this is not different than setting up a regular FastLED sketch apart from using `FastLEDManager` instead of `FastLED`.
93+
Change `NUM_LEDS`, `LED_TYPE` and `LIGHTSTRIP_PIN` according to your hardware configuration. You may notice that this is not different than setting up a regular FastLED sketch apart from using `FastLEDHub` instead of `FastLED`.
9394

9495
### Adding a new animation
9596

@@ -98,7 +99,7 @@ Create a new animation file `Animations/ExampleAnimation.h`:
9899
```cpp
99100
#pragma once
100101

101-
#include <FastLEDManager.h>
102+
#include <FastLEDHub.h>
102103

103104
class ExampleAnimation : public Animation
104105
{
@@ -114,7 +115,7 @@ public:
114115

115116
void loop()
116117
{
117-
// animate FastLEDManager.leds
118+
// animate FastLEDHub.leds
118119
}
119120
};
120121
```
@@ -123,11 +124,11 @@ While creating your animation proceed as you usually would with FastLED by defin
123124

124125
Keep in mind the following important differences to just using FastLED:
125126
- The regular `setup` function is called `reset` to emphasize its purpose
126-
- Instead of creating your own `leds` array use the existing `FastLEDManager.leds`
127-
- Within your animation use `FastLEDManager.numLeds` instead of `NUM_LEDS`
128-
- Every time you may want to use `FastLED` use `FastLEDManager` instead. Since `FastLEDManager` inherits from `FastLED` all member functions will be available just like before. FastLEDManager just adds some stuff on top of that.
127+
- Instead of creating your own `leds` array use the existing `FastLEDHub.leds`
128+
- Within your animation use `FastLEDHub.numLeds` instead of `NUM_LEDS`
129+
- Every time you may want to use `FastLED` use `FastLEDHub` instead. Since `FastLEDHub` inherits from `FastLED` all member functions will be available just like before. FastLEDHub just adds some stuff on top of that.
129130

130-
If you want to convert an existing FastLED sketch (e.g. from [atuline/FastLED-Demos](https://github.com/atuline/FastLED-Demos)), so it can be handled by FastLEDManager, those are the necessary changes you have to perform.
131+
If you want to convert an existing FastLED sketch (e.g. from [atuline/FastLED-Demos](https://github.com/atuline/FastLED-Demos)), so it can be handled by FastLEDHub, those are the necessary changes you have to perform.
131132

132133
### Registering animations
133134

@@ -147,38 +148,38 @@ The animation name can be any unique string and will be used to identify animati
147148
148149
### Static color display
149150
150-
FastLEDManager allows you to display a static color in the web interface. It will be handled as a separate animation and will always have animation index `0`. This is important if you want to trigger animations using HTTP requests.
151+
FastLEDHub allows you to display a static color in the web interface. It will be handled as a separate animation and will always have animation index `0`. This is important if you want to trigger animations using HTTP requests.
151152
152153
### Pre-defined and custom sliders
153154
154-
You can add custom numeric sliders of type `int16_t` to adjust variables of animations dynamically. FastLEDManager automatically adds two sliders for brightness (0-1023, default: 1023) and animation speed (0-255, default: 127). Both of these fixed sliders have been integrated tightly into FastLEDManager and don't require any further attention. Changing the brightness will apply gamma correction automatically. Adjusting the speed will affect the effective delay of `FastLEDManager.delay()` to speed up or slow down animations. To prevent this explicitly use `FastLED.delay()` or Arduino's standard `delay()`.
155+
You can add custom numeric sliders of type `int16_t` to adjust variables of animations dynamically. FastLEDHub automatically adds two sliders for brightness (0-1023, default: 1023) and animation speed (0-255, default: 127). Both of these fixed sliders have been integrated tightly into FastLEDHub and don't require any further attention. Changing the brightness will apply gamma correction automatically. Adjusting the speed will affect the effective delay of `FastLEDHub.delay()` to speed up or slow down animations. To prevent this explicitly use `FastLED.delay()` or Arduino's standard `delay()`.
155156
156157
To add more custom sliders simply register them in the main sketch via
157158
158159
```cpp
159-
FastLEDManager.registerSlider(new Slider("Saturation", 150, 255, 200, 1));
160+
FastLEDHub.registerSlider(new Slider("Saturation", 150, 255, 200, 1));
160161
```
161162

162163
This example registers a slider with a range of `150-255` and step size `1` defaulting to the value `200`. Again the slider name `"Saturation"` can be any unique string identifying the slider in the web interface.
163164

164165
To access custom slider values inside of your animation use
165166

166167
```cpp
167-
int16_t saturation = FastLEDManager.getSlider("Saturation")->value;
168+
int16_t saturation = FastLEDHub.getSlider("Saturation")->value;
168169
```
169170

170171
### Hardware inputs
171172

172-
FastLEDManager supports a potentiometer for brightness adjustments and a push button to cycle through animations. They have to be specifically enabled with
173+
FastLEDHub supports a potentiometer for brightness adjustments and a push button to cycle through animations. They have to be specifically enabled with
173174

174175
```cpp
175-
FastLEDManager.enablePotentiometer(potentiometerPin);
176+
FastLEDHub.enablePotentiometer(potentiometerPin);
176177
```
177178

178179
and
179180

180181
```cpp
181-
FastLEDManager.enableToggleButton(togglePin);
182+
FastLEDHub.enableToggleButton(togglePin);
182183
```
183184

184185
### Alarm and sunset

data/index.htm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html>
33

44
<head>
5-
<title>FastLED Manager</title>
5+
<title>FastLEDHub</title>
66
<meta charset="utf-8">
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88
<meta name="mobile-web-app-capable" content="yes">
@@ -25,7 +25,7 @@ <h4 id="connectingOverlayText">Connecting...</h4>
2525
</div>
2626

2727
<div id="wrapper">
28-
<h1 style="text-align: center">FastLED Manager</h1>
28+
<h1 style="text-align: center">FastLEDHub</h1>
2929

3030
<div id="animationButtons">
3131
<button type="button" class="btn btn-secondary color no-alpha" id="colorButton">Color</button>

library.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"name": "FastLEDManager",
3-
"description": "Control multiple FastLED lightstrip animations on the ESP8266 without reuploading and more...",
2+
"name": "FastLEDHub",
3+
"description": "Control multiple FastLED lightstrip animations on the ESP8266 without reuploading.",
44
"repository":
55
{
66
"type": "git",
7-
"url": "https://github.com/stnkl/FastLEDManager.git"
7+
"url": "https://github.com/stnkl/FastLEDHub.git"
88
},
99
"frameworks": "arduino",
1010
"platforms": "espressif8266",
@@ -14,5 +14,5 @@
1414
"maintainer": true,
1515
"url": "https://github.com/stnkl"
1616
},
17-
"version": "1.0.0"
17+
"version": "0.9.0"
1818
}

library.properties

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
name=FastLEDManager
2-
version=1.0.0
1+
name=FastLEDHub
2+
version=0.9.0
33
author=Stephan Rumswinkel
44
maintainer=Stephan Rumswinkel
5-
sentence=Control multiple FastLED lightstrip animations on the ESP8266 without reuploading and more...
6-
paragraph=Control multiple FastLED lightstrip animations on the ESP8266 without reuploading and more...
7-
url=https://github.com/stnkl/ESPEssentials.git
5+
sentence=Control multiple FastLED lightstrip animations on the ESP8266 without reuploading.
6+
paragraph=Control multiple FastLED lightstrip animations on the ESP8266 without reuploading.
7+
url=https://github.com/stnkl/FastLEDHub.git
88
category=Display
99
architectures=esp8266
1010
depends=WiFiManager,ESPEssentials,ArduinoJson,LinkedList,FastLED,WebSockets
11-
includes=FastLEDManager.h

src/Animations/Color.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#include <FastLEDManager.h>
3+
#include <FastLEDHub.h>
44

55
class Color : public Animation
66
{
@@ -13,8 +13,8 @@ class Color : public Animation
1313

1414
void loop()
1515
{
16-
fill_solid(FastLEDManager.leds, FastLEDManager.numLeds, strtol((const char *)&Config.color[0], NULL, 16));
16+
fill_solid(FastLEDHub.leds, FastLEDHub.numLeds, strtol((const char *)&Config.color[0], NULL, 16));
1717

18-
FastLEDManager.show();
18+
FastLEDHub.show();
1919
}
2020
};

src/Config.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ bool ConfigClass::initialize()
88
{
99
if (!SPIFFS.begin())
1010
{
11-
PRINTLN("[FastLEDManager] Couldn't mount file system.");
11+
PRINTLN("[FastLEDHub] Couldn't mount file system.");
1212
return false;
1313
}
1414

1515
File configFile = SPIFFS.open(configFilename, "r");
1616
if (!configFile)
1717
{
18-
PRINTLN("[FastLEDManager] Opening file '" + configFilename + "' failed.");
18+
PRINTLN("[FastLEDHub] Opening file '" + configFilename + "' failed.");
1919
return false;
2020
}
2121

@@ -127,7 +127,7 @@ bool ConfigClass::save()
127127
File configFile = SPIFFS.open(configFilename, "w");
128128
if (!configFile)
129129
{
130-
PRINTLN("[FastLEDManager] Opening file " + configFilename + " for saving failed.");
130+
PRINTLN("[FastLEDHub] Opening file " + configFilename + " for saving failed.");
131131
return false;
132132
}
133133

src/Fade.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "Fade.h"
22

3-
#include "FastLEDManager.h"
3+
#include "FastLEDHub.h"
44
#include "SerialOut.h"
55

66
#include <ArduinoJson.h>
@@ -48,16 +48,16 @@ void handle()
4848
else if (Config.sunsetEnabled && now->tm_hour == Config.sunsetHour && now->tm_min == Config.sunsetMinute)
4949
{
5050
// Only start sunset if all leds are off
51-
if (FastLEDManager.brightness10 == 0)
51+
if (FastLEDHub.brightness10 == 0)
5252
{
5353
Fade::begin(Fade::FadeMode::SUNSET);
5454
}
5555
else // brightness10 > 0
5656
{
5757
bool ledsIlluminated = false;
58-
for (uint16_t i = 0; i < FastLEDManager.numLeds; i++)
58+
for (uint16_t i = 0; i < FastLEDHub.numLeds; i++)
5959
{
60-
if (FastLEDManager.hardwareLeds[i] != CRGB(0, 0, 0))
60+
if (FastLEDHub.hardwareLeds[i] != CRGB(0, 0, 0))
6161
{
6262
ledsIlluminated = true;
6363
break;
@@ -74,7 +74,7 @@ void begin(FadeMode fadeMode)
7474
{
7575
// Set fade starting point
7676
fadeBrightness = 1;
77-
FastLEDManager.show(fadeBrightness);
77+
FastLEDHub.show(fadeBrightness);
7878

7979
currentFade = fadeMode;
8080

@@ -84,16 +84,16 @@ void begin(FadeMode fadeMode)
8484

8585
if (fadeMode == Fade::FadeMode::ALARM)
8686
{
87-
FastLEDManager.begin(FastLEDManager.getAnimation(Config.alarmAnimation));
87+
FastLEDHub.begin(FastLEDHub.getAnimation(Config.alarmAnimation));
8888
fadeTicker.attach_ms(Config.alarmDuration * 60 * 1000 / 1024, tick);
89-
PRINTLN("[FastLEDManager] Start fade 'Alarm'");
89+
PRINTLN("[FastLEDHub] Start fade 'Alarm'");
9090
}
9191
else if (fadeMode == Fade::FadeMode::SUNSET)
9292
{
93-
FastLEDManager.begin(FastLEDManager.getAnimation(Config.sunsetAnimation));
94-
sunsetMaximumBrightness = FastLEDManager.brightness10;
93+
FastLEDHub.begin(FastLEDHub.getAnimation(Config.sunsetAnimation));
94+
sunsetMaximumBrightness = FastLEDHub.brightness10;
9595
fadeTicker.attach_ms(Config.sunsetDuration * 60 * 1000 / sunsetMaximumBrightness, tick);
96-
PRINTLN("[FastLEDManager] Start fade 'Sunset'");
96+
PRINTLN("[FastLEDHub] Start fade 'Sunset'");
9797
}
9898
}
9999

@@ -105,20 +105,20 @@ void stop()
105105

106106
void tick()
107107
{
108-
if (FastLEDManager.status == PAUSED)
108+
if (FastLEDHub.status == PAUSED)
109109
return;
110110

111111
if (currentFade == Fade::FadeMode::ALARM && fadeBrightness == 1023)
112112
{
113113
if (Config.postAlarmAnimation != Config.alarmAnimation)
114-
FastLEDManager.begin(FastLEDManager.getAnimation(Config.postAlarmAnimation));
114+
FastLEDHub.begin(FastLEDHub.getAnimation(Config.postAlarmAnimation));
115115
fadeTicker.detach();
116-
PRINTLN("[FastLEDManager] End fade 'Alarm'");
116+
PRINTLN("[FastLEDHub] End fade 'Alarm'");
117117
}
118118
else if (currentFade == Fade::FadeMode::SUNSET && fadeBrightness == sunsetMaximumBrightness)
119119
{
120120
fadeTicker.detach();
121-
PRINTLN("[FastLEDManager] End fade 'Sunset'");
121+
PRINTLN("[FastLEDHub] End fade 'Sunset'");
122122
}
123123
else
124124
{
@@ -127,15 +127,15 @@ void tick()
127127
else
128128
fadeTicker.detach();
129129

130-
PRINTLN("[FastLEDManager] Fade brightness: " + String(fadeBrightness));
130+
PRINTLN("[FastLEDHub] Fade brightness: " + String(fadeBrightness));
131131
}
132132

133-
FastLEDManager.brightness10 = fadeBrightness;
133+
FastLEDHub.brightness10 = fadeBrightness;
134134
}
135135

136136
void getSunsetTime()
137137
{
138-
PRINT("[FastLEDManager] Getting sunset time...");
138+
PRINT("[FastLEDHub] Getting sunset time...");
139139

140140
WiFiClient client;
141141
HTTPClient http;

src/Fade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <Arduino.h>
66

77

8-
class FastLEDManagerClass;
8+
class FastLEDHubClass;
99

1010
namespace Fade
1111
{

0 commit comments

Comments
 (0)