Second display address not showing up. It should be 0x71 I think

This is the base code I am working off.

https://learn.adafruit.com/nau7802-pet- … food-scale

I2c discovery only show these two address no matter how I connect the LCDs.

board.STEMMA_I2C() addresses found: [‘0x2a’, ‘0x70’]

0x2A (which is the stress gauge board) and 0x70 which is the default for one of the 7-segment displays but did not see 0x71 which would be the address of the other 7-segment display.

using two displays together

display = Seg14x4(i2c, address=(0x70, 0x71))

start-up text

display.print("HELLO ")

If I go to line 14 and remove the reference to the address 0x71, the code runs and the LCDs show gibberish.

You haven’t changed the i2c address on the second display yet. Check the hookup guide for how to do that.

Do I solder a pin on the second board to a pin on the first? How do I set set the address to 0x71. The project guide has this configuration for the displays but I am not sure closed means.

Alphanumeric Display I2C Jumpers

Alphanumeric display 1 (on the left): A0, A1 and A2 open (0x70)

Alphanumeric display 2 (on the right): A0 closed, A1 and A2 open (0x71)

I think I found it.

Example 8 on this guide.

https://learn.sparkfun.com/tutorials/sp … -guide/all

Yep, that’s it. Just make sure to close jumper A0 on the second display by soldering the two pads together.

I soldered the A0 Closed. I am now getting all the correct i2c addresses… The Displays still are not displaying the expected output. Do I need to install other packages? This is the guide I am going off.

https://learn.adafruit.com/nau7802-pet- … food-scale

Does example 8 work?

Yes, I now have all three address afte soldering the A0. My issue now is that the displays output is gibberish. I think I might need to install software packages for these sparkfun displays. I am using circup to install packages. I found this on github but I am not sure if this is what I need.

https://github.com/sparkfun/Qwiic_OLED_ … me-ov-file

Also,

I tried to install sparkfun-qwiic-oled-display but it was not found.

Here are the imports I currently have. I think that since the display boards are not the exact same as the ones used in the guide that I might be missing drivers.

mport time

import board

from digitalio import DigitalInOut, Direction, Pull

from adafruit_ht16k33.segments import Seg14x4

from cedargrove_nau7802 import NAU7802

from calibration import calibration

You don’t have an OLED so the OLED libraries won’t do any good.

I suspect the adafruit displays your code is written for are wired differently than the sparkfun displays you’re actually using and that causes the wrong segments to illuminate for a given digit/letter.

Adafruit uses the file [adafruit_ht16k33.segments to determine how to form digits/letters.

Sparkfun uses the file [SparkFun_Alphanumeric_Display.cpp to determine how to form digits/letters.

Looking at both files, you can see how the different libraries print the number “0” on the display

Adafruit: 0b00001100, 0b00111111, # 0

SparkFun: 0b00000000111111, // ‘0’

The 1’s and 0’s tell the display backpack which segments to light up to form the number or letter you’re trying to display. Unfortunately adafruit and sparkfun use different methods to accomplish the same task.

Sparkfun at least gives you a clue in the code that shows which bit in the 14 bit pertains to which segment on the actual display. If you analyze the code you should be able to figure out how adafruit is doing the same thing.

// nmlkjihgfedcba

You will need to edit the adafruit_ht16k33.segments file to have the same data as sparkfun’s SparkFun_Alphanumeric_Display.cpp file. Problem is, adafruit stores this data as two 8 bit numbers where sparkfun stores the data as a single 14 bit number. If you know someone that’s good with programming, they should be able to help you make the conversion from one to the other. With enough test code and trial & error you should be able to figure out how to make the edits yourself.](SparkFun_Alphanumeric_Display_Arduino_Library/src/SparkFun_Alphanumeric_Display.cpp at main · sparkfun/SparkFun_Alphanumeric_Display_Arduino_Library · GitHub)](adafruit_ht16k33.segments — Adafruit HT16K33 Library 1.0 documentation)

Just noticed the two different displays use different controllers as well. It might be easier for you to use the adafruit displays rather than adapting the code to work with sparkfun displays.

I ordered the exact ones that are in the guide. I hope that makes the difference

The guide you linked too uses these displays:

https://www.adafruit.com/product/2158

The sparkfun ones are very close and with some code tweaks should work but the code “as is” only works with the adafruit display.

Technically the sparkfun displays are working, the problem is the wrong segments light up because the code assumes you’re using the adafruit displays and the library for the display uses a different setup.

I ordered the corrected displays, and they work no problem. Using the adafruit display and their libraries.

Now I am going to try to figure out how to setup a scale with wifi or bluetooth.