adafruit / adafruit/Adafruit_CircuitPython_HT16K33

Issue with 7 segment display - 3rd character not displaying, also doesn't work with 8 character 7 segment display

Open Beginner friendly
#122 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
49
Forks
29
PR merge metrics
No merged PRs in 30d

Description

When using the library with the following script I get a buffer error, and also the 3rd character from the left is blank on the display even when using the default chars_per_display=4. As I'm using an 8 character display the subsequent characters are shifted to the right

```
import board
from adafruit_ht16k33 import segments

i2c = board.I2C()
display = segments.Seg7x4(i2c, address=0x70, chars_per_display=8)
display.print("12345678")
```

I spotted this in the code - line 441 in https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/segments.py line 441

`POSITIONS = (0, 2, 6, 8) # The positions of characters.`

Changing this to

`POSITIONS = (0, 2, 4, 6, 8, 10, 12) # The positions of characters.`

solves both issues
`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with segments.py around line 441 and reproduce the reported script using chars_per_display=4 and 8. Verify that the 3rd character is displayed, eight-character output does not shift or overflow the buffer, and the relevant display behavior is covered by the project's tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.