Open
Description
Hi!
I started working with the 7 segment display.
I downloaded the tutorial code, and tried to display a "-" symbol.
But it turned out like this:
(the other cables are for a temperature sensor and a fan)
https://imgur.com/jLiU4ut
The code:
# SPDX-FileCopyrightText: 2019 Mikey Sklar for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import busio
from adafruit_ht16k33 import segments
# Create the I2C interface.
i2c = busio.I2C(board.SCL, board.SDA)
# Create the LED segment class.
# This creates a 7 segment 4 character display:
display = segments.Seg7x4(i2c)
# Clear the display.
display.fill(0)
display.print("-")
time.sleep(0.5)
I fixed it with set_digit_raw and it seems like it uses a different binary code than the one specified in the program.
The working code (still the same tutorial code edit):
# SPDX-FileCopyrightText: 2019 Mikey Sklar for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import time
import board
import busio
from adafruit_ht16k33 import segments
# Create the I2C interface.
i2c = busio.I2C(board.SCL, board.SDA)
# Create the LED segment class.
# This creates a 7 segment 4 character display:
display = segments.Seg7x4(i2c)
# Clear the display.
display.fill(0)
display.set_digit_raw(3, 0b01000000)
time.sleep(0.5)
Metadata
Metadata
Assignees
Labels
No labels