Qwiic MP3 Trigger connections

After many hours I was able to piece together some what of a working sketch.

I am still unable to make the second keypad function,

I soldered the ADR to make the jumper on 1 of the keypads to change address and verified it with the I2C Scanner example. It now shows to be 0x4A.

Any help in showing me how to add a second keypad to my sketch would be outstanding.

Here is my current sketch.

/*

1 BLACK Board with Qwiic connector

1 Qwiic MP3 Trigger

2 Qwiick Keypad

Object of this sketch is to use two Keypads to Trigger the MP3 files

1 keypad address normal 0x4B

1 keypad address changed to 0x4A by jumping the ADR on board

To all be used on same bus

SD card loaded with some MP3s in the root directory

Plug the Qwiic device onto an available Qwiic port

Open the serial monitor at 9600 baud

*/

#include “SparkFun_Qwiic_Keypad_Arduino_Library.h”

#include “SparkFun_Qwiic_MP3_Trigger_Arduino_Library.h” //http://librarymanager/All#SparkFun_MP3_Trigger

MP3TRIGGER mp3;

KEYPAD keypad1; //Create instance of this object

KEYPAD keypad2; //Create instance of this object

void setup(void)

{

Serial.begin(9600);

Serial.println(“Qwiic MP3 Trigger Rebel Station”);

Wire.setClock(400000); //MP3 Trigger supports higher I2C rates

if (mp3.begin(Wire) == false)

{

Serial.println(“MP3 Trigger does not appear to be connected. Please check wiring. Freezing…”);

while (1);

}

if (keypad1.begin() == false) // Note, using begin() like this will use default I2C address, 0x4B.

if (keypad2.begin(Wire, 0x4A) == false) // You can pass begin() a different address like so: keypad1.begin(Wire, 0x4A).

{

Serial.println(“Keypad does not appear to be connected. Please check wiring. Freezing…”);

while (1);

}

Serial.print("Initialized. Firmware Version: ");

Serial.println(keypad1.getVersion());

}

void loop(void)

{

keypad1.updateFIFO(); // necessary for keypad to pull button from stack to readable register

char button = keypad1.getButton();

if (button == -1)

{

Serial.println(“No keypad detected”);

delay(1000);

}

else if (button != 0)

{

if (button == ‘1’) mp3.playTrack(1); //Begin playing the first track on the SD card

if (button == ‘2’) mp3.playTrack(2);

if (button == ‘3’) mp3.playTrack(3);

if (button == ‘4’) mp3.playTrack(4);

if (button == ‘5’) mp3.playTrack(5);

if (button == ‘6’) mp3.playTrack(6);

if (button == ‘7’) mp3.playTrack(7);

if (button == ‘8’) mp3.playTrack(8);

if (button == ‘9’) mp3.playTrack(9);

if (button == ‘0’) mp3.playTrack(10);

if (button == ‘#’) Serial.println();

else if (button == ‘*’) Serial.print(" ");

else Serial.print(button);

}

delay(25); //25 could be more if needed

}