I am getting an AttributeError: 'module' object has no attribute 'Seg7x4'
trying to use an Adafruit .56 in i2C 7 segment display with a
Metro Express using circuit python
My lib looks like this:
Shelley:circuitpy john$ cd lib
Shelley:lib john$ ls
adafruit_bus_device adafruit_ht16k33 neopixel.mpy
adafruit_dotstar.mpy adafruit_register simpleio.mpy
adafruit_hid adafruit_waveform
Shelley:lib john$
This is my code copied (I think and hope) from the AF tutorial.
Adafruit CircuitPython 2.2.0 on 2018-01-02; Adafruit Metro M0 Express with samd21g18
>>> import board
>>> import busio as io
>>> i2c = io.I2C(board.SCL, board.SDA)
>>> import adafruit_ht16k33.segments
>>> display = adafruit_ht16k33.Seg7x4(i2C)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Seg7x4'
7 segment display
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- danhalbert
- Posts: 4688
- Joined: Tue Aug 08, 2017 12:37 pm
Re: 7 segment display
A little typo: do this:
Code: Select all
>>> import adafruit_ht16k33.segments
>>> display = adafruit_ht16k33.segments.Seg7x4(i2C) # add .segments
Please be positive and constructive with your questions and comments.