adafruit / Adafruit_CircuitPython_HT16K33

Adafruit CircuitPython driver for the HT16K33, a LED matrix driver IC.
MIT License
41 stars 29 forks source link

segments: Add missing API for "dot" control on big 7-segments #41

Closed vdehors closed 4 years ago

vdehors commented 5 years ago

There are 4 side LEDs around the 4 7-segments on 1.2" packages of HT16k33 (https://www.adafruit.com/product/1270). This commit adds an API to control them (set and get).

There already was setter and getter to control "ampm" dot (the one at the top-right). This API is still working but now use the new added functions.

vdehors commented 5 years ago

Hi tannewt,

Indeed, I didn't see the Colon class (which implemented what I needed btw). I made your changes but the "colon" property may be enough (with doc) ?

bobdog6861 commented 4 years ago

I would like to disable the zero blanking of first and second digits, so that I can display the zeros. I cannot seem to figure out where in the driver it is making that decision. Is it in _put, in ht16k33.py ?

tannewt commented 4 years ago

@bobdog6861 unless you are testing with this version, please open a separate issue for your question.

makermelissa commented 4 years ago

I'm thinking this PR may not be necessary. I'm going to attempt to set up a small code example to light up all segments and dots and will paste it here if I can get it working.

makermelissa commented 4 years ago

Ok, here's how you fill each thing with the way the library currently is now:

import board
from adafruit_ht16k33 import segments
i2c = board.I2C()
display = segments.BigSeg7x4(i2c)

# Clear the display.
display.fill(0)

# Fill Everything
display.print("8888") # Each Digit. You can also use display[0]
display.colon[0] = True  # Middle Colon
display.colon[1] = True  # Left Colon
display.ampm = True  # Upper Dot
makermelissa commented 4 years ago

@vdehors, I am going to reopen this. I now understand this adds the ability to add separate control of the left side dots, which is excellent. However, as @tannewt suggested, we probably should remove the two_dots_center setter and getters because of the redundancy.

kattni commented 4 years ago

@makermelissa Thank you for reviewing this PR! Please consider making the necessary changes yourself so we can get this merged. If you need assistance with that, let me know. Thanks!