Skip to content

Commit 2f808bb

Browse files
committed
Merge branch 'dev'
2 parents ab4d47b + f359eca commit 2f808bb

17 files changed

+107
-87
lines changed

Diff for: CHANGELOG.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Changelog
22

3+
## v2.0.1 (2021-12-16)
4+
5+
- Renamed library to `Blinkenlight`
6+
37
## v2.0.0 (2021-12-16)
48

59
- **Revamped API!**
610
- New: writes the state only on changes, not on every update
711
- Renamed the classes and header files:
8-
- `IndicatorPin` -> `Indicator`
9-
- `FadingIndicatorPin` -> `FadeIndicator`
10-
- `Indicator` -> `BaseIndicator`
11-
- `FadingIndicator` -> `BaseFadeIndicator`
12+
- `BlinkenlightPin` -> `Blinkenlight`
13+
- `FadingBlinkenlightPin` -> `Fadinglight`
14+
- `Blinkenlight` -> `BaseBlinker`
15+
- `FadingBlinkenlight` -> `BaseFader`
1216
- Code cleanups
1317
- Uses GitHub Actions for tests
1418

Diff for: README.md

+34-18
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,28 @@
1-
# Arduino-Indicator
1+
# Arduino-Blinkenlight
22

3-
[![tests](https://github.com/tfeldmann/Arduino-Indicator/actions/workflows/tests.yml/badge.svg)](https://github.com/tfeldmann/Arduino-Indicator/actions/workflows/tests.yml)
3+
[![tests](https://github.com/tfeldmann/Arduino-Blinkenlight/actions/workflows/tests.yml/badge.svg)](https://github.com/tfeldmann/Arduino-Blinkenlight/actions/workflows/tests.yml)
44

55
## 🚨 Supercharge your status-LEDs 🚨
66

77
> This library gives you non-blocking blinking patterns and smooth fade effects for your
88
> LEDs, buzzers or any other status indicators
99
10+
<pre align="center">
11+
<strong>Achtung Alles Lookenskeepers!</strong>
12+
Das computermachine ist nicht fuer gefingerpoken und
13+
mittengrabben. Ist easy schnappen der springenwerk,
14+
blowenfusen und poppencorken mit spitzensparken. Ist nicht
15+
fuer gewerken bei das dumpkopfen. Das rubbernecken
16+
sichtseeren keepen das cotten-pickenen hans in das pockets
17+
muss; <i>relaxen und watchen das blinkenlichten.</i>
18+
</pre>
19+
20+
## Why
21+
22+
I created this library because I like to blink my error codes to the user. So for
23+
example blink two times for problems with component X, three times for component Y - you
24+
get the idea.
25+
1026
## Features
1127

1228
- Basics: On / off / toggle
@@ -31,9 +47,9 @@ This example blinks the built-in LED on pin 13 in the following pattern:
3147
- Repeat
3248

3349
```C
34-
#include <FadeIndicator.h>
50+
#include <Fadinglight.h>
3551

36-
FadeIndicator led(13);
52+
Fadinglight led(13);
3753

3854
void setup()
3955
{
@@ -49,19 +65,19 @@ void loop()
4965
Easy, uh? It's not only blinking, it does so with smooth fading effects and
5066
logarithmic LED brightness compensation. Your boards never looked more professional! /s
5167
52-
> Note: If you don't love the fading effects, just use the `Indicator`-class instead of
53-
> `FadeIndicator`.
68+
> Note: If you don't love the fading effects, just use the `Blinkenlight`-class instead
69+
> of `Fadinglight`. This sure does make your code more stylish.
5470
5571
## Full API
5672
5773
```C
5874
// Without fading effect:
59-
#include <Indicator.h>
60-
Indicator myPin(13);
75+
#include <Blinkenlight.h>
76+
Blinkenlight myPin(13);
6177
6278
// With fading effect:
63-
#include <FadeIndicator.h>
64-
FadeIndicator myPin(13);
79+
#include <Fadinglight.h>
80+
Fadinglight myPin(13);
6581
6682
// now in your code you can do:
6783
myPin.permanent(LOW);
@@ -126,24 +142,24 @@ void setSpeed(uint16_t on_ms);
126142
myLed.settings.on_ms = 250;
127143
myLed.settings.pause_ms = 2000;
128144

129-
// `true` if the indicator is currently blinking, showing a pattern, flashing or pausing
145+
// `true` if the Blinkenlight is currently blinking, showing a pattern, flashing or pausing
130146
bool isOn();
131147

132148
// You must call this in your loop!
133-
// Returns the current value of the indiciator (LOW / HIGH).
149+
// Returns the current value of the light (LOW / HIGH).
134150
// - You can ignore that if you want.
135151
int update();
136152
```
137153
138-
## My status indicator is controlled via CAN / I2C / SPI / ... What can I do?
154+
## I have a status indicator controlled via CAN / I2C / SPI / ... What can I do?
139155
140156
No problem! You have two options.
141157
142-
- Use the generic `BaseIndicator` class from `<BaseIndicator.h>`. The `.update()`-method
158+
- Use the generic `BaseBlinker` class from `<BaseBlinker.h>`. The `.update()`-method
143159
returns a boolean whether the status is currently `HIGH` or `LOW`. You can then send
144-
this value to your status indicator (see `examples/GenericBlink`).
145-
Use the `BaseFadeIndictor` class if you want fading effects. Here the `update` method
160+
this value to your status Blinkenlight (see `examples/GenericBlink`).
161+
Use the `BaseFader` class if you want fading effects. Here the `update` method
146162
returns an integer `0..255`.
147163
148-
- Subclass the `BaseIndicator` class with custom logic. This is what `Indicator` does
149-
internally (see `src/Indicator.h`). Have a look at the `SerialBlink` example!
164+
- Subclass the `BaseBlinker` class with custom logic. This is what `Blinkenlight` does
165+
internally (see `src/Blinkenlight.h`). Have a look at the `SerialBlink` example!

Diff for: examples/Blink/Blink.ino

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Start a blinking pattern on the built-in LED with a smooth fading effect.
33
*/
44

5-
#include <FadeIndicator.h>
5+
#include <Fadinglight.h>
66

7-
// We use `FadeIndicator` for a smooth fade.
8-
FadeIndicator led(13);
7+
// We use `Fadinglight` for a smooth fade.
8+
Fadinglight led(13);
99

1010
void setup()
1111
{

Diff for: examples/CustomSpeed/CustomSpeed.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <Indicator.h>
1+
#include <Blinkenlight.h>
22

3-
Indicator led(13);
3+
Blinkenlight led(13);
44
SpeedSetting mySettings = {
55
.on_ms = 100,
66
.off_ms = 100,

Diff for: examples/FadingBlink/FadingBlink.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*
22
Start a blinking pattern on the built-in LED with a smooth fading effect.
33
*/
4-
#include <FadeIndicator.h>
4+
#include <Fadinglight.h>
55

6-
FadeIndicator led(13);
6+
Fadinglight led(13);
77

88
void setup()
99
{

Diff for: examples/GenericBlink/GenericBlink.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
/*
2-
This example shows how to use a generic indicator.
2+
This example shows how to use a generic Blinkenlight.
33
The `update()` method returns HIGH or LOW that you can use however you want.
44
5-
Of course this example would be easer with a `Indicator` which handles the
5+
Of course this example would be easer with a `Blinkenlight` which handles the
66
digital output automatically.
77
*/
8-
#include <BaseIndicator.h>
8+
#include <BaseBlinker.h>
99

10-
BaseIndicator myIndicator;
10+
BaseBlinker myBlinkenlight;
1111

1212
void setup()
1313
{
1414
pinMode(13, OUTPUT);
15-
myIndicator.blink();
15+
myBlinkenlight.blink();
1616
}
1717

1818
void loop()
1919
{
20-
bool isOn = myIndicator.update();
20+
bool isOn = myBlinkenlight.update();
2121
digitalWrite(13, isOn);
2222
}

Diff for: examples/Pattern/Pattern.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <Indicator.h>
1+
#include <Blinkenlight.h>
22

3-
Indicator led(13);
3+
Blinkenlight led(13);
44

55
void setup()
66
{

Diff for: examples/Pattern2/Pattern2.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <Indicator.h>
1+
#include <Blinkenlight.h>
22

3-
Indicator led(13);
3+
Blinkenlight led(13);
44

55
void setup()
66
{

Diff for: examples/SerialBlink/SerialBlink.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
* port.
44
*/
55

6-
#include <BaseIndicator.h>
6+
#include <BaseBlinker.h>
77

8-
class SerialBlinker : public BaseIndicator
8+
class SerialBlinker : public BaseBlinker
99
{
1010
public:
1111
void write(int state) override

Diff for: examples/SpeedAdjustment/SpeedAdjustment.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#include <FadeIndicator.h>
1+
#include <Fadinglight.h>
22

3-
FadeIndicator led(13);
3+
Fadinglight led(13);
44

55
uint32_t lastSwitch;
66
bool isFast;

Diff for: library.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "Indicator",
3-
"version": "2.0.0",
2+
"name": "Blinkenlight",
3+
"version": "2.0.1",
44
"description": "This library gives you non-blocking blinking patterns and smooth fade effects for your LEDs, buzzers or any other status indicators",
55
"keywords": "led, signal, fading, blink",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/tfeldmann/Arduino-Indicator.git"
8+
"url": "https://github.com/tfeldmann/Arduino-Blinkenlight.git"
99
},
1010
"authors": [
1111
{
@@ -16,7 +16,7 @@
1616
}
1717
],
1818
"license": "MIT",
19-
"homepage": "https://github.com/tfeldmann/Arduino-Indicator",
19+
"homepage": "https://github.com/tfeldmann/Arduino-Blinkenlight",
2020
"dependencies": [],
2121
"frameworks": "arduino",
2222
"platforms": "*",

Diff for: library.properties

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name=Indicator
2-
version=2.0.0
1+
name=Blinkenlight
2+
version=2.0.1
33
author=Thomas Feldmann <[email protected]>
44
maintainer=Thomas Feldmann <[email protected]>
55
sentence=Supercharge your status LEDs / beepers
66
paragraph=This library gives you non-blocking blinking patterns and smooth fade effects for your LEDs, buzzers or any other status indicators
77
category=Signal Input/Output
8-
url=https://github.com/tfeldmann/Arduino-Indicator
8+
url=https://github.com/tfeldmann/Arduino-Blinkenlight
99
architectures=*

0 commit comments

Comments
 (0)