Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P165] Add plugin Display - NeoPixel (7-segment) #5113

Open
wants to merge 26 commits into
base: mega
Choose a base branch
from

Conversation

tonhuisman
Copy link
Contributor

@tonhuisman tonhuisman commented Aug 25, 2024

Resolves #4111
Resolves #4894

Features:

  • [P165] Add Display - NeoPixel (7-segment) plugin, for building (large) NeoPixel based 7-segment displays (like score-boards)
    • 1..4 groups
    • 1..4 digits per group
    • segment height 1..7 pixels (configured per group of digits)
    • segment width 1..7 pixels.
    • decimal point 0..7 pixels.
    • extra pixels after a group of digits 0..12 pixels (to f.e. use as a colon).
    • offset pixels before a group, 0..15 pixels, that can also be used from commands
    • Can show:
      • Manual content (text, user defined characters).
      • Scrolling text when longer than available digits (text and user defined characters).
      • Time (12/24 hour format, blinking/non-blinking colon). Optionally using the decimal dot for blinking, instead of the extra pixels.
      • Date.
    • Colors for entire display configured in Device configuration.
    • Configurable (via commands) colors per group and/or digits.
    • Configurable fonts, similar to P073 7Dgt displays.
    • Commands similar to P073 7Dgt displays.
    • Show Digit preview in Device Configuration, or Number plan, incl. count of pixels per group and total pixels.
    • Number plan can start at Left-top pixel or Right-top pixel.
    • Numbering can start at the right-most digit (per group configurable), but all content still is applied from left to right, over
      all groups.
    • Numbering can start at the g-segment (center segment), this disables & ignores the 'Split g-segment pixels' and 'Decimal dot last segment' options.
    • Number plan can be counter-clockwise.
    • Available in NEOPIXEL, ESP32 DISPLAY and COLLECTION G, and MAX builds.
    • Uses a slightly adapted version of the Noiasca NeoPixel 7segment library (to allow for displays using > 255 NeoPixels)

TODO:

  • Testing by requesters (confirmed)
  • Documentation
  • Feature requests?
    • Wiring plan start at g-segment
    • Use decimal dot (second digit from configured offset) for time-indicator blinking
    • Update documentation for g-segment numbering start and decimal dot blinking

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Aug 25, 2024

An example of the Digit configuration: (Updated: 27-08-2024)
image

And the matching Number Plan:
image

The 'worst case' max number of pixels configuration (absolutely untested!) using 816 1040 NeoPixels:
image

@fly74
Copy link

fly74 commented Aug 25, 2024

Is there a config option for double dots for clocks like in "12:33"?

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Aug 25, 2024

Is there a config option for double dots for clocks like in "12:33"?

That's what the Extra pixels are used for, I'll explain in the documentation how they are to be configured & used. It's somewhat complicated when using the Right To Left configuration, as then these extra pixels will be to the left of the group, not to the right. I might need to change that in the preview-display (they are now always shown on the right, but there's a note they should be wired/placed on the left side of the group, as the numbering suggests)

And I think the Digit numbering needs some work...

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Aug 27, 2024

@fly74 @Alex-Orts
I've done a breaking change in the configuration in the last commit (2024-08-27), so it's best to delete any previously created task with this plugin, and re-add it.
This change allows even more pixels per segment (up to 15, but now limited to 7), but that requires some more changes, and probably a huge power supply to make it work.
And though I've written above that the current max. no. of pixels is 1040, when using the Pixel-offset before option (max 15), the total number of pixels is 1100 🤯.
These Pixels before a group (originally intended to allow some physical space between digits) can now also be addressed using the 7dbefore command, similar to the 7dextra command for lighting up these groups, either all pixels, or the first half or the last half (and off, of course). Documentation will follow, describing all available features and commands 😎

The additional pixels are now shown in the location they will be mounted, either to the right or the left of the group (fixed that in the previous commit already).
I've reduced the Digit preview in the UI to ca. 80% size, to reduce the used screen real-estate during configuration.
Because of the expanded width/height pixels per segment, I've added a check for no more than 64 pixels per digit are configured (that's currently not possible, but the check is already there and tested 😺.

@tonhuisman
Copy link
Contributor Author

For those interested, here's a screenshot of the documentation I just committed:
Display - NeoPixel (7-Segment) — ESP Easy 2.1-beta1 documentation.pdf

Feedback is welcome, as usual 😉

@Alex-Orts
Copy link

Снимок
If the quantity is more than 2, you get something that is not convenient for soldering.

@tonhuisman
Copy link
Contributor Author

If the quantity is more than 2, you get something that is not convenient for soldering.

That's why there is the Right to Left digits option. if you enable that for both groups, the groups will be shown in descending order, as you can see in the documentation preview pdf I made available (above).
You can experiment with the options per group below the line (general advice: keep that all the same for all groups), to find the most optimal wiring plan.

And I see you're not using the latest build available, as some newly added options aren't visible in your screenshot (I updated the documentation but not the pdf, yet... 😊). Get the current latest build from this GH Actions run

NB: There's a somewhat interesting discussion going on in this issue #4111

@Alex-Orts
Copy link

Снимок
Is it possible to implement such numbering in digital form for more convenient installation (soldering)?

@TD-er
Copy link
Member

TD-er commented Sep 16, 2024

And where is the dot?
What index?

Looks like it will be the 8th position, right?

@Alex-Orts
Copy link

Alex-Orts commented Sep 16, 2024

Снимок
The point is the same as now, in the gap.

@tonhuisman
Copy link
Contributor Author

tonhuisman commented Sep 16, 2024

Снимок The point is the same as now, in the gap.

The numbers in this image don't make sense to me, it's going from 1 to 10, when following the arrow directions? 🤔

Can you refer to the segments in this fashion: (image copied from the other thread)
image

Then your suggested numbering could be like this: g, c, dp, d, e, f, a, b

That's not supported yet, though.

@TD-er
Copy link
Member

TD-er commented Sep 16, 2024

The numbers in this image don't make sense to me, it's going from 1 to 10, when following the arrow directions? 🤔

Probably 5 LEDs per segment

@Alex-Orts
Copy link

Alex-Orts commented Sep 16, 2024

Then your suggested numbering could be like this: g, c, dp, d, e, f, a, b

That's exactly what I meant

@tonhuisman
Copy link
Contributor Author

Then your suggested numbering could be like this: g, c, dp, d, e, f, a, b

That's exactly what I meant

I'll add support for that, it looks like a clever wiring solution to me 👍.

@tonhuisman
Copy link
Contributor Author

@Alex-Orts I've added support for a numbering plan starting at the g-segment.
Can you please test using this Actions run ?

@Alex-Orts
Copy link

Checked - works. But only in manual mode. Clock and date mode do not work. Can it blink one dot?

@tonhuisman
Copy link
Contributor Author

Clock and date mode do not work.

Hmm, will have to look into that.

Can it blink one dot?

Sure, if you configured that in Extra pixels after it should be used for blinking or set to On for non-blinking.

@Alex-Orts
Copy link

And if without additional pixels? Only a point in the digit.

@tonhuisman
Copy link
Contributor Author

And if without additional pixels? Only a point in the digit.

I have not implemented options to address 'random' pixels in the stripe, but you can configure pixels after the group of digits, that will be used for the blinking at the time/date, and pixels before the group (initially to have some unused pixels for 'transportation distance' between the digits).
Both these groups of pixels can be addressed separately (and also per half of the section if > 1 pixel) by using commands 7dextra and 7dbefore. For details please consult the .pdf docs I shared above.

@Alex-Orts
Copy link

I meant using the decimal point of the discharge, as in the 4-digit indicators.

@tonhuisman
Copy link
Contributor Author

I meant using the decimal point of the discharge, as in the 4-digit indicators.

Hmm, that would (currently) require you to put the value with and without a period to that digit, f.e. by using the 7digit command, but it's not implemented to be used as the blinking indicator for time and date.
I'll think about if and how that could be made possible.

@tonhuisman
Copy link
Contributor Author

using the decimal point of the discharge, as in the 4-digit indicators.

@Alex-Orts I've added an option to use the decimal dot for the blinking time indicator. That inhibits the use of the extra pixels for blinking.

Clock and date mode do not work.

Ah, found & fixed an initialization issue

Can you test this Actions run, please?

@Alex-Orts
Copy link

All of the above worked. Thank you for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NEOPIXEL 7-segment display Is there a RGB 7 segment possible
4 participants