-
Notifications
You must be signed in to change notification settings - Fork 157
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
Support neosegment displays #112
Conversation
…o feature/neosegment * 'master' of git://github.com/rm-hull/luma.led_matrix: Alternative WS2812 implementation (#113)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see inline comments.
doc/python-usage.rst
Outdated
NeoSegments | ||
""""""""""" | ||
`@msurguy <https://twitter.com/msurguy?lang=en>`_ has `crowdsourced some WS2812 neopixels <https://www.crowdsupply.com/maksmakes/neosegment>`_ | ||
into a modular 3D-printed seven-segment module: To program these devices: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace seven-segment module:
with seven-segment module.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
doc/python-usage.rst
Outdated
neoseg.color = "green" | ||
|
||
The :py:class:`~luma.led_matrix.device.neosegment` class extends :py:class:`~luma.core.virtual.sevensegment`, | ||
so the same text assignment (python slicing paradigms) can be use here as well - |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Python with a capital
- 'use' should be 'used'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
from neopixel_demo import gfx | ||
|
||
|
||
def rainbow(n=1000, saturation=1, value=1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a docstring for this method would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
luma/led_matrix/device.py
Outdated
techniques as the base class, but provides additional functionality to be | ||
able to adddress individual characters colors. | ||
|
||
:param width: the number of 7-segment elements that are cascaded. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'the' should be 'The'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
tests/test_neosegment.py
Outdated
@@ -0,0 +1,93 @@ | |||
#!/usr/bin/env python | |||
# -*- coding: utf-8 -*- | |||
# Copyright (c) 2014-17 Richard Hull and contributors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2017 only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
tests/test_neosegment.py
Outdated
# Copyright (c) 2014-17 Richard Hull and contributors | ||
# See LICENSE.rst for details. | ||
|
||
import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(optional..) missing docstring for this module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, thanks for creating a PR! I will be trying this out on the weekend and will let you know if there is anything that I can contribute code-wise.
luma.led_matrix 0.11.0 released with the feature included |
See #106
Rendered documentation here: http://luma-led-matrix.readthedocs.io/en/feature-neosegment/python-usage.html#neosegments