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

Can't get sample script to run? HT16K33 import? #2

Open
dachshund-digital opened this issue Apr 14, 2018 · 1 comment
Open

Can't get sample script to run? HT16K33 import? #2

dachshund-digital opened this issue Apr 14, 2018 · 1 comment

Comments

@dachshund-digital
Copy link

No where in your example do you illustrate imports? A git clone of the project how do you leverage your solution?

#!/bin/env python

Create letters "a", "b", "c", & "d" across all for digits displays

?????

Enable device

digit = FourDigit().setUp()

Create characters

a = digit.TOP_BAR | digit.MIDDLE_BAR |
digit.BOTTOM_BAR | digit.RIGHT_TOP_BAR |
digit.RIGHT_BOTTOM_BAR | digit.LEFT_BOTTOM_BAR
b = digit.MIDDLE_BAR | digit.BOTTOM_BAR |
digit.LEFT_TOP_BAR | digit.LEFT_BOTTOM_BAR |
digit.RIGHT_BOTTOM_BAR
c = digit.MIDDLE_BAR | digit.BOTTOM_BAR | digit.LEFT_BOTTOM_BAR
d = digit.MIDDLE_BAR | digit.BOTTOM_BAR |
digit.RIGHT_TOP_BAR | digit.RIGHT_BOTTOM_BAR |
digit.LEFT_BOTTOM_BAR

Assign custom built characters to device

digit.setDigit(0,a)
digit.setDigit(1,b)
digit.setDigit(2,c)
digit.setDigit(3,d)

@dachshund-digital
Copy link
Author

Another example... of import errors and explanation...

python FourDigit.py

Traceback (most recent call last):
File "FourDigit.py", line 1, in
from ._HT16K33 import Device
ValueError: Attempted relative import in non-package

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

No branches or pull requests

1 participant