Adafruit is open and shipping! Let's build back better, together!
0

sevensegment_test.py Problem.
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

sevensegment_test.py Problem.

by goobertek on Wed Nov 11, 2020 7:10 pm

Trying to get a 7 Segment display working with my Raspberry Pi. Followed the instructions online and tested it using:

$ sudo i2cdetect -y 1

Results looked like:
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

When I run python3 ./sevensegment_test.py the first time I get:
Traceback (most recent call last):
File "./sevensegment_test.py", line 21, in <module>
display[0] = '1'
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_ht16k33/segments.py", line 179, in __setitem__
self.show()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_ht16k33/ht16k33.py", line 117, in show
self.i2c_device.write(self._buffer)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 102, in write
self.i2c.writeto(self.device_address, buf, start=start, end=end)
File "/home/pi/.local/lib/python3.7/site-packages/busio.py", line 115, in writeto
return self._i2c.writeto(address, memoryview(buffer)[start:end], stop=stop)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 308, in write_bytes
self._device.write(buf)
OSError: [Errno 121] Remote I/O error

I run it again and get:
Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 172, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File "/home/pi/.local/lib/python3.7/site-packages/busio.py", line 116, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 308, in write_bytes
self._device.write(buf)
OSError: [Errno 121] Remote I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 178, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File "/home/pi/.local/lib/python3.7/site-packages/busio.py", line 106, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 56, in readfrom_into
readin = self._i2c_bus.read_bytes(address, end - start)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 179, in read_bytes
return self._device.read(number)
OSError: [Errno 121] Remote I/O error

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "./sevensegment_test.py", line 11, in <module>
display = segments.Seg7x4(i2c)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_ht16k33/segments.py", line 327, in __init__
super().__init__(i2c, address, auto_write)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_ht16k33/ht16k33.py", line 54, in __init__
self.i2c_device = i2c_device.I2CDevice(i2c, address)
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 68, in __init__
self.__probe_for_device()
File "/home/pi/.local/lib/python3.7/site-packages/adafruit_bus_device/i2c_device.py", line 180, in __probe_for_device
raise ValueError("No I2C device at address: %x" % self.device_address)
ValueError: No I2C device at address: 70

If I rerun sudo i2cdetect -y 1 I get the first error and then the second error. Before I go and purchase another display (assuming the one I have is bad), any ideas on how to fix it? I have checked the GPIO configuration 3 times and it looks good for the four connectors.
I am running the latest version of Raspian

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by adafruit_support_carter on Wed Nov 11, 2020 7:16 pm

Most likely some kind of connection issue. Can you post a photo of your setup showing how everything is wired together.

adafruit_support_carter
 
Posts: 17637
Joined: Tue Nov 29, 2016 2:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Wed Nov 11, 2020 7:31 pm

Two images attached. Thanks a ton for the help
Attachments
47CE014C-4917-4B87-B458-8E43C2D8200F.jpeg
47CE014C-4917-4B87-B458-8E43C2D8200F.jpeg (118.18 KiB) Viewed 84 times
9B3EDDAE-089A-4960-8B6E-E33D421ECCD5.jpeg
9B3EDDAE-089A-4960-8B6E-E33D421ECCD5.jpeg (145.12 KiB) Viewed 84 times

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by adafruit_support_carter on Wed Nov 11, 2020 7:44 pm

Thanks. That looks OK in terms of pins being used. So maybe soldering. Let's check the backpack first. Can you post a photo showing the solder job on header pins here (other side):
solder.jpg
solder.jpg (29.96 KiB) Viewed 81 times

adafruit_support_carter
 
Posts: 17637
Joined: Tue Nov 29, 2016 2:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Wed Nov 11, 2020 7:50 pm

My soldering isn’t the best but they look to have clearance. See attached
Attachments
0940E487-C26A-4BC4-A1E6-F7F5FA4A5EC9.jpeg
0940E487-C26A-4BC4-A1E6-F7F5FA4A5EC9.jpeg (84.08 KiB) Viewed 81 times

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by adafruit_support_carter on Thu Nov 12, 2020 2:32 pm

Thanks. Can't tell for sure from that angle, but guessing it's a solder issue. For now, focus on just these pins:
soldering.jpg
soldering.jpg (12.31 KiB) Viewed 72 times


They do appear to be separated, so no solder bridges shorting anything out. But are they wetted out adequately on the PCB's solder pads? See here for example:
https://learn.adafruit.com/adafruit-gui ... n-problems

adafruit_support_carter
 
Posts: 17637
Joined: Tue Nov 29, 2016 2:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Sat Nov 21, 2020 5:48 pm

Update:

I have built 4 more 7 segement displays with the the backpack. All have an identical response so it's not my sodering. Does anyone have any additional suggestions?

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Sun Nov 22, 2020 4:20 pm

I just changed all the jumper wires and got the same result. I upgrade and updated raspian and checked to make sure ic2 is enabled. No luck. I reloaded everything from the learning section on the seven segment with a backpack. still the same. Any ideas what to try next?

ROB

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Sun Nov 22, 2020 4:40 pm

just checking another thing. Is this the correct output:

pi@raspberrypi:~ $ lsmod | grep -i i2c
i2c_bcm2835 16384 0
i2c_dev 20480 0

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by adafruit_support_carter on Mon Nov 23, 2020 1:41 pm

That looks fine.

Do you have any other I2C devices?

Do you have another board other than the Pi that we could try and talk to the LEDs with?

adafruit_support_carter
 
Posts: 17637
Joined: Tue Nov 29, 2016 2:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Mon Nov 23, 2020 2:49 pm

Nothing else is connected to the PI. I can probably load it up on another PI if thats' what you suggest is the next test?

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Re: sevensegment_test.py Problem.

by adafruit_support_carter on Mon Nov 23, 2020 2:57 pm

OK, we can use the other Pi as a another check.

But first:
I have built 4 more 7 segement displays with the the backpack.

Please layout all those next to each other, solder side up, and post a photo.

adafruit_support_carter
 
Posts: 17637
Joined: Tue Nov 29, 2016 2:45 pm

Re: sevensegment_test.py Problem.

by goobertek on Mon Nov 23, 2020 6:50 pm

I tried another pi. Same results. Here is a video of my test:

goobertek
 
Posts: 149
Joined: Tue Feb 03, 2015 9:45 pm

Please be positive and constructive with your questions and comments.