Hello, I just purchased an Adafruit 0.56" 4-Digit 7-Segment Display w/I2C Backpack and I'm having trouble getting it working. The directions say if using the STEMMA QT version (which I am), to replace the example code matrix.begin(0x70); with matrix.begin(0x70, &Wire1);
The example code will compile just fine, but then not display anything on the display. When I do the above mentioned replacement (see below), it won't compile. I get "Compilation error: 'Wire1' was not declared in this scope."
I'm using Arduino IDE 2.3.4 and an Arduino Uno. Thanks for any help.
I think those directions are misleading. On boards that have a "STEMMA QT"/"Qwiic" connector, that connector is generally connected to the microcontroller's second I2C bus. Since this secondary bus is referenced in the code using the Wire1 object, you must configure the library to use that object, as described in the directions. However, if you are connecting the backpack to a board like the UNO R3 that only has a single I2C bus then those directions are not appropriate, and you should instead use the default library configuration, which uses the primary I2C bus.
So change this line of your sketch:
back to this
matrix.begin(0x70);
then upload the sketch to the UNO R3 board again. Hopefully this time it will compile without any errors and work as expected.
Thanks for the reply. I did put the code back to the original example and as I was typing out my response here, removed some unnecessary wires from the Arduino and then the display came on. There must have been some kind of short somewhere. So it's working now!