forked from letscontrolit/ESPEasy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request letscontrolit#5113 from tonhuisman/feature/P165-ne…
…opixel-7segment-display [P165] Add plugin Display - NeoPixel (7-segment)
- Loading branch information
Showing
95 changed files
with
8,700 additions
and
516 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
.. csv-table:: | ||
:header: "Command Syntax", "Extra information" | ||
:widths: 20, 30 | ||
|
||
" | ||
``7don`` | ||
"," | ||
Turn the display on, if it was turned off before using the ``7doff`` command. (Not implemented yet) | ||
" | ||
" | ||
``7doff`` | ||
"," | ||
Turn the display off, can later be turned on again by using the ``7don`` command. (Not implemented yet) | ||
" | ||
" | ||
``7db,<brightness>`` | ||
|
||
``<brightness>``: Set the brightness between 0 and 255. Will be limited to the max. value configured in **Maximum allowed brightness** setting. | ||
"," | ||
Changes the **Initial brightness** config setting, and the brightness of the strip. The setting is not saved unless the ``save`` command is used. | ||
" | ||
" | ||
``7output,<output option>`` | ||
"," | ||
Change the Display Output setting, available options: | ||
|
||
* 0 - Manual | ||
* 1 - Clock 24h - Blink | ||
* 2 - Clock 24h - No Blink | ||
* 3 - Clock 12h - Blink | ||
* 4 - Clock 12h - No Blink | ||
* 5 - Date | ||
" | ||
" | ||
``7dfont,<font>`` | ||
|
||
"," | ||
Select a different font, either by name: ``Default`` or ``7dgt`` for the original font (0), ``Siekoo`` for standard Siekoo font (1), ``Siekoo_Upper`` for the Siekoo font with uppercase 'CHNORUX' characters (2), and ``dSEG7`` for the dSEG7 font (3). Numbers can also be used, 0, 1, 2, or 3 as noted. Fontnames are not case-sensitive. | ||
" | ||
" | ||
``7dtext,<text>`` | ||
|
||
Examples: | ||
|
||
``7dtext,OUT [BLK#Temperature#d2.1]^`` | ||
|
||
``7dtext,HU. [BLK#Humidity#d2.1]^o`` Will result in 'HU. 57.2°o' being displayed | ||
"," | ||
To display a text on the display. Any variable can be used. Unsupported characters (like accented letters) will show as a space (empty digit). | ||
|
||
With the Scroll Text option disabled, the first n characters the display can show are displayed, if the Scroll Text option is enabled, longer texts will scroll from right to left across the display, at the set speed. | ||
" | ||
" | ||
``7digit,<grp>,<dgt>,<char>[.]`` | ||
"," | ||
Draw a single character in the exact group & digit. When followed by a period, the decimal point will also be used. | ||
" | ||
" | ||
``7dbin,<byte>,...`` | ||
|
||
Example: | ||
|
||
``7dbin,0x40,0x20,0x10,0x08,0x04,0x02,0x01,0x80`` | ||
"," | ||
To display any bit pattern on the display. | ||
|
||
The example shows each digit with a different segment on, including the dot/colon, and assuming an 8 digit configuration, or Scroll Text enabled. | ||
|
||
See explanation on how the bits map to segments, below. | ||
" | ||
" | ||
``7dgroup,<group>`` | ||
|
||
``<group>`` Range 0..<number of configured groups> | ||
"," | ||
Set the default group any command should be applied to. Group 0 is the entire display, and the default. | ||
" | ||
" | ||
``7color,<fg_r>,<fg_g>,<fg_b>[,<fg_w>],<bg_r>,<bg_g>,<bg_b>[,<bg_w>]`` | ||
"," | ||
Set the foreground, and/or background colors for the entire display. When a GRBW strip is configured, the brightness/white values have to be provided too. For only setting the background colors, leave out values for the foreground colors, but keep the commas. | ||
|
||
Color values can be in range 0..255. | ||
|
||
When group or digit colors are configured, then those will get priority. | ||
" | ||
" | ||
``7digitcolor,<grp>,<dgt>,<fg_r>,<fg_g>,<fg_b>[,<fg_w>],<bg_r>,<bg_g>,<bg_b>[,<bg_w>]`` | ||
"," | ||
Set the foreground, and/or background colors for a specific digit of a group. When a GRBW strip is configured, the brightness/white values have to be provided too. For only setting the background colors, leave out values for the foreground colors, but keep the commas. | ||
|
||
Both <grp> (group) and <dgt> (digit) are required, and must be in range 1..<available groups/digits for that group>. | ||
|
||
Color values can be in range 0..255. | ||
|
||
To clear a digit color, to use the group or global defaults, provide ``-`` instead of the <fg_r> value. The rest of the arguments will then be ignored. | ||
|
||
Digit colors have highest priority. | ||
" | ||
" | ||
``7groupcolor,<grp>,<fg_r>,<fg_g>,<fg_b>[,<fg_w>],<bg_r>,<bg_g>,<bg_b>[,<bg_w>]`` | ||
"," | ||
Set the foreground, and/or background colors for a all digits of a group. When a GRBW strip is configured, the brightness/white values have to be provided too. For only setting the background colors, leave out values for the foreground colors, but keep the commas. | ||
|
||
Group <grp> is required, and must be in range 1..<available groups>. | ||
|
||
Color values can be in range 0..255. | ||
|
||
To clear a group color, to use the global defaults, provide ``-`` instead of the <fg_r> value. The rest of the arguments will then be ignored. | ||
|
||
Group color will be overridden by a digit color, when set. | ||
" | ||
" | ||
``7dextra,<grp>,<state>[,<r>,<g>,<b>[,<w>]]`` | ||
|
||
``7dbefore,<grp>,<state>[,<r>,<g>,<b>[,<w>]]`` | ||
|
||
``<state>`` : 0, 1, 2, 3, 4 or 5 | ||
"," | ||
Set the extra pixels after or before the digit On or Off, according to the state. The optionally supplied color will be used for the state. If not used, the the global background color will be used for Off, and the global foreground color for On. | ||
|
||
State: | ||
|
||
* ``0`` : All Off | ||
|
||
* ``1`` : All On | ||
|
||
* ``2`` : Low-numbered half of pixels Off | ||
|
||
* ``3`` : Low-numbered half of pixels On | ||
|
||
* ``4`` : High-numbered half of pixels Off | ||
|
||
* ``5`` : High-numbered half of pixels On | ||
" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
Example 1 | ||
^^^^^^^^^ | ||
|
||
For displaying the time in a 24 hour format, and an optionally blinking colon as the hours/minutes separator, you can define this Group/Digit setup: | ||
|
||
.. image:: P165_example1_config.png | ||
:height: 75pc | ||
|
||
This defines 2 Groups of each 2 Digits. The height and width of the segments can be configured as preferred, this example uses 3 pixels for both. When using more pixels per segment, like 5, 6 or 7, it is probably better to define a larger decimal point, if that is to be used, 3 seems appropriate in that case, and also the extra pixels, used to add the colon separator, could have 4 to 8 pixels to get a matching size with the large segments. | ||
|
||
The number-plan for this layout is presented like this: | ||
|
||
.. image:: P165_example1_number.png | ||
:height: 75pc | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
Example 2 | ||
^^^^^^^^^ | ||
|
||
For displaying the time in a 12 hour format, and an optionally blinking colon as the hours/minutes separator, you can define this Group/Digit setup: | ||
|
||
.. image:: P165_example2_config.png | ||
:height: 75pc | ||
|
||
The option to suppress the leading 0 on day/hour option is enabled now, so the left-most digit will be empty most of the time. | ||
|
||
We have defined 2 Groups of each 2 Digits, but effectively use only 3 1/2 digit. The height and width of the segments can be configured as preferred, this example uses 3 pixels for both. When using more pixels per segment, like 5, 6 or 7, it is probably better to define a larger decimal point, if that is to be used, 3 seems appropriate in that case, and also the extra pixels, used to add the colon separator, could have 4 to 8 pixels to get a matching size with the large segments. | ||
|
||
.. note:: This layout is presented in reverse order, as all groups use the **Right to Left digits** option. The actual positioning is still with Group 1 as the left-most group, and then using the numerically next group(s). This layout is needed to make the number-plan work from right to left. | ||
|
||
The number-plan for this layout is presented like this: | ||
|
||
.. image:: P165_example2_number.png | ||
:height: 75pc | ||
|
||
The number-plan starts at the Right-Top pixel, instead of the Left-Top pixel, so the a-segment for the left-most digit can be excluded. | ||
|
||
To save space and a few pixels, or create a larger display with a standard strip-length, the marked numbers (76..90) can be excluded from the build, as for a 12 hour clock the left-most digit is 0 most of the time, and that 0 is being suppressed, so no pixels will light up. | ||
|
||
.. image:: P165_example2a_number.png | ||
:height: 75pc | ||
|
||
This shows an increased layout, using 4-pixel segments and a 4-pixel colon, that can be built from exactly 100 pixels, 2 50-pixel wired-pixelchains as available from EBay, Aliexpress etc. | ||
|
||
Again, the marked pixels (101..120) can be excluded. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
|
||
Example 3 | ||
^^^^^^^^^ | ||
|
||
For displaying a game score, with an indicator of the active player by using a half of the extra pixels, you can define this Group/Digit setup: | ||
|
||
.. image:: P165_example3_config.png | ||
:height: 75pc | ||
|
||
We have defined 2 Groups of each 2 Digits, and enabled the Corners Overlap option to have a more explicitly defined digit. The height and width of the segments can be configured as preferred, this example uses 3 pixels for both. When using more pixels per segment, like 5, 6 or 7, the extra pixels, used to add the left/right player indicator, could have 4 to 8 pixels to get a matching size with the large segments. | ||
|
||
The number-plan for this layout is presented like this: | ||
|
||
.. image:: P165_example3_number.png | ||
:height: 75pc | ||
|
||
The number-plan starts at the Left-Top pixel. | ||
|
||
For mounting the middle segment easier/more efficient, this segment can be split in a left and right half, by checking the Split g-segment pixels. The number-plan then looks like this: | ||
|
||
.. image:: P165_example3a_number.png | ||
:height: 75pc | ||
|
||
The right half of the g-segment is placed between the b and c segments, and the left half of the g-segment between the e and f segments. | ||
|
||
|
||
To control the player-indicator, the extra pixels 41 and 42 should be placed to indicate the digits from Group 1 being the active player score, and extra pixels 43 and 44 placed to indicate the digits from Group 2 for the other player. | ||
|
||
These rules can be added to use 2 buttons (PlayerA and PlayerB) to select the active player: | ||
|
||
.. code:: text | ||
On PlayerA#State=0 Do | ||
7dextra,0,4 // Player B Off | ||
7dextra,0,3 // Player A On | ||
Endon | ||
On PlayerB#State=0 Do | ||
7dextra,0,2 // Player A Off | ||
7dextra,0,5 // Player B On | ||
Endon | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
just to remove write protection for this folder/library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
NoiascaNeopixelDisplay | ||
========== | ||
NoiascaNeopixelDisplay is an [Arduino](http://arduino.cc) library for WS2812 LED display drivers. | ||
|
||
Documentation | ||
------------- | ||
- | ||
|
||
Download | ||
-------- | ||
The lastest binary version of the Library is always available from the | ||
[NoiascaLedControl Release Page]http://werner.rothschopf.net/ | ||
|
||
|
||
Install | ||
------- | ||
Unzip the content to your Arduino Library Folder |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.