I posted this on the Audio Forum site as well, but it is a Qwiic interface issue.
I cannot get Qwiic/I2C communication between arduino mega and tsunami super wav card.
The tsunami card works without a problem using manual triggers.
The arduino mega card works without a problem talking to a RTC board indicating the I2C implementation is OK.
I have tried connecting tsunami through the RTC board (it has pass-thru I2C pins) and also tried connecting the tsunami directly to the arduino board - no difference.
The tsunami is connected through a bi-directional level shifter board, and I confirmed that a negative-going 3.3V logic signal (burst) from the arduino is present at the Qwiic connector using an oscilloscope. I have checked I2C clock and data are connected correctly (and I tried swapping the signals just in case). I am using the default 0x13 address.
I am using your Tsunami Qwiic Arduino Library and your Example Code. The code fails the tsunami.begin() statement. It returns error code 1. It is compiled using Arduino IDE v2.04 and the sketch generates no compile errors. I looked at the tsunami library .h and .cpp code and it seems to be all there.
The tsunami card has the original firmware version, I have not changed it. Is there another firmware version to enable the Qwiic port? Is there some latency issue between writing/reading to the port (can’t imaging since I have set baud rate at 9600)?
The tsunami.ini file includes #tsum (I run mono mode) and #baud 9600 to match the PC / arduino baud rates.
The arduino code I used to test the tsunami communication:
#include “SparkFun_Tsunami_Qwiic.h”
#include “uEEPROMLib.h”
#include “Arduino.h”
#include “RTClib.h”
#include “Wire.h”
TsunamiQwiic tsunami;
RTC_DS1307 rtc;
int onoffled = 13; // On board yellow LED - using for debug
int relaypinnumber;
char daysOfTheWeek[7][12] = { “Sunday”, “Monday”, “Tuesday”, “Wednesday”, “Thursday”, “Friday”, “Saturday” };
// Initialize hardware ports and environment
void setup() {
Serial.begin(9600);
Wire.begin();
tsunami.begin(); // initialize Tsunami card
Serial.print("Tsunami return code: ");
Serial.println(tsunami.begin());
delay(2000); //Let console routine run
// Check to see if Tsunami Qwiic is present on the bus
// Note, here we are calling begin() with no arguments = defaults (address:0x13, I2C-port:Wire)
if (tsunami.begin() == false) {
Serial.println(“Tsunami Qwiic failed to respond. Please check wiring and possibly the I2C address. Freezing…”);
while (1)
;
};
I talked to Robertsonics about the situation, and they indicated it must be something with the SparkFun application.
I do not know how to proceed from here. Need some help.
Thanks,
-Greg