adafruit_ht16k33.ht16k33
¶
Authors: Radomir Dopieralski & Tony DiCola for Adafruit Industries
- class adafruit_ht16k33.ht16k33.HT16K33(i2c: busio.I2C, address: int = 112, auto_write: bool = True, brightness: float = 1.0)[source]¶
The base class for all displays. Contains common methods.
- Parameters
adafruit_ht16k33.bargraph
¶
Authors: Carter Nelson for Adafruit Industries
adafruit_ht16k33.matrix¶
- class adafruit_ht16k33.matrix.Matrix16x8(i2c: busio.I2C, address: int = 112, auto_write: bool = True, brightness: float = 1.0)[source]¶
The matrix wing.
- class adafruit_ht16k33.matrix.Matrix8x8(i2c: busio.I2C, address: int = 112, auto_write: bool = True, brightness: float = 1.0)[source]¶
A single matrix.
- image(img: <module 'PIL.Image' from '/home/docs/checkouts/readthedocs.org/user_builds/adafruit-circuitpython-ht16k33/envs/4.2.0/lib/python3.7/site-packages/PIL/Image.py'>) None [source]¶
Set buffer to value of Python Imaging Library image. The image should be in 1 bit mode and a size equal to the display size.
- Parameters
img (Image) – The image to show
- pixel(x: int, y: int, color: Optional[bool] = None) Optional[bool] [source]¶
Get or set the color of a given pixel.
- shift_down(rotate: bool = False) None [source]¶
Shift all pixels down
- Parameters
rotate – (Optional) Rotate the shifted pixels to top (default=False)
- shift_left(rotate: bool = False) None [source]¶
Shift all pixels left
- Parameters
rotate – (Optional) Rotate the shifted pixels to the right side (default=False)
- class adafruit_ht16k33.matrix.Matrix8x8x2(i2c: busio.I2C, address: int = 112, auto_write: bool = True, brightness: float = 1.0)[source]¶
A bi-color matrix.
- fill(color: bool) None [source]¶
Fill the whole display with the given color.
- Parameters
color (bool) – Whether to fill the display
- image(img: <module 'PIL.Image' from '/home/docs/checkouts/readthedocs.org/user_builds/adafruit-circuitpython-ht16k33/envs/4.2.0/lib/python3.7/site-packages/PIL/Image.py'>) None [source]¶
Set buffer to value of Python Imaging Library image. The image should be a size equal to the display size.
- Parameters
img (Image) – The image to show
adafruit_ht16k33.segments¶
- class adafruit_ht16k33.segments.BigSeg7x4(i2c: busio.I2C, address: int = 112, auto_write: bool = True)[source]¶
Numeric 7-segment display. It has the same methods as the alphanumeric display, but only supports displaying a limited set of characters.
- Parameters
- class adafruit_ht16k33.segments.Colon(disp: adafruit_ht16k33.segments.Seg7x4, num_of_colons: int = 1)[source]¶
Helper class for controlling the colons. Not intended for direct use.
- class adafruit_ht16k33.segments.Seg14x4(i2c: busio.I2C, address: int = 112, auto_write: bool = True, brightness: float = 1.0)[source]¶
Alpha-numeric, 14-segment display.
- marquee(text: str, delay: float = 0.25, loop: bool = True) None [source]¶
Automatically scroll the text at the specified delay between characters
- print(value: Union[str, int, float], decimal: int = 0) None [source]¶
Print the value to the display.
- print_hex(value: int) None [source]¶
Print the value as a hexidecimal string to the display.
- Parameters
value (int) – The number to print
- scroll(count: int = 1) None [source]¶
Scroll the display by specified number of places.
- Parameters
count (int) – The number of places to scroll
- class adafruit_ht16k33.segments.Seg7x4(i2c: busio.I2C, address: int = 112, auto_write: bool = True)[source]¶
Numeric 7-segment display. It has the same methods as the alphanumeric display, but only supports displaying a limited set of characters.
- Parameters
- scroll(count: int = 1) None [source]¶
Scroll the display by specified number of places.
- Parameters
count (int) – The number of places to scroll
adafruit_ht16k33.animations
¶
Authors: ladyada
Test script for display animations on an HT16K33 with alphanumeric display
The display must be initialized with auto_write=False.
- class adafruit_ht16k33.animations.Animation(display)[source]¶
Animation class for the htk33 Main driver for all alphanumeric display animations (WIP!!!)
- Parameters
display – HTK33 Display object
- animate(digits, bitmasks, delay=0.2, auto_write=True)[source]¶
Animate function
- Parameters
digits – a list of the digits to write to, in order, like [0, 1, 3]. The digits are 0 to 3 starting at the left most digit.
bitmasks – a list of the bitmasks to write, in sequence, to the specified digits.
delay – The delay, in seconds (or fractions of), between writing bitmasks to a digit.
auto_write – Whether to actually write to the display immediately or not.