Can I send data from Teensy with Audio Shield to Arduino?

I have a Teensy board soldered to an audio shield. I tried connecting wires from pins 18 and 19 to the Arduino Uno pins A4 and A5. respectively. I then run the i2c_scanner code program on Arduino. The scan does not find the Teensy. Will this set up work or is there another means I need to use to communicate with Arduino?
 
I have a Teensy board soldered to an audio shield. I tried connecting wires from pins 18 and 19 to the Arduino Uno pins A4 and A5. respectively. I then run the i2c_scanner code program on Arduino. The scan does not find the Teensy. Will this set up work or is there another means I need to use to communicate with Arduino?

That will not work. Teensy is a master. I2c supports only one master.

Either configure the uno as client or just use Serial - which is much easier to handle anyway.
Hopefully the Uno runs with 3.3 Volt - not 5V
 
What should it do with the audio shield then?
But of course you can do everything. I think when someone asks this question in that case the next answer is the question How?.. so prepare to answer that ;) esp how to init the shield from another slave.

Have fun.
 
From the Arduino, I am running the out of the box i2c_scanner program.

// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
// by Arduino.cc user Krodal.
// Changes by louarnold removed.
// Scanning addresses changed from 0...127 to 1...119,
// according to the i2c scanner by Nick Gammon
// http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
// As version 4, but address scans now to 127.
// A sensor seems to use address 120.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//

#include <Wire.h>


void setup()
{
Wire.begin();

Serial.begin(9600);
Serial.println("\nI2C Scanner");
}


void loop()
{
byte error, address;
int nDevices;

Serial.println("Scanning...");

nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();

if (error == 0)
{
Serial.print("I2C device found at address 0x");
if (address<16)
Serial.print("0");
Serial.print(address,HEX);
Serial.println(" !");

nDevices++;
}
else if (error==4)
{
Serial.print("Unknow error at address 0x");
if (address<16)
Serial.print("0");
Serial.println(address,HEX);
}
}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");

delay(5000); // wait 5 seconds for next scan
}
 
Code:
// --------------------------------------
// --------------------------------------
// i2c_scanner
//
// Version 1
// This program (or code that looks like it)
// can be found in many places.
// For example on the Arduino.cc forum.
// The original author is not known.
// Version 2, Juni 2012, Using Arduino 1.0.1
// Adapted to be as simple as possible by Arduino.cc user Krodal
// Version 3, Feb 26 2013
// V3 by louarnold
// Version 4, March 3, 2013, Using Arduino 1.0.3
// by Arduino.cc user Krodal.
// Changes by louarnold removed.
// Scanning addresses changed from 0...127 to 1...119,
// according to the i2c scanner by Nick Gammon
// http://www.gammon.com.au/forum/?id=10896
// Version 5, March 28, 2013
// As version 4, but address scans now to 127.
// A sensor seems to use address 120.
//
//
// This sketch tests the standard 7-bit addresses
// Devices with higher bit address might not be seen properly.
//

#include <Wire.h>


void setup()
{
	Wire.begin();

	Serial.begin(9600);
	Serial.println("\nI2C Scanner");
}


void loop()
{
	byte error, address;
	int nDevices;

	Serial.println("Scanning...");

	nDevices = 0;
	for (address = 1; address < 127; address++)
	{
		// The i2c_scanner uses the return value of
		// the Write.endTransmisstion to see if
		// a device did acknowledge to the address.
		Wire.beginTransmission(address);
		error = Wire.endTransmission();

		if (error == 0)
		{
			Serial.print("I2C device found at address 0x");
			if (address < 16)
				Serial.print("0");
			Serial.print(address, HEX);
			Serial.println(" !");

			nDevices++;
		}
		else if (error == 4)
		{
			Serial.print("Unknow error at address 0x");
			if (address < 16)
				Serial.print("0");
			Serial.println(address, HEX);
		}
	}
	if (nDevices == 0)
		Serial.println("No I2C devices found\n");
	else
		Serial.println("done\n");

	delay(5000); // wait 5 seconds for next scan
}
Code Wrap makes included software look like above.
To use press the # key when creating answer.
Add this line to your setup
Code:
While (!Serial && Millis<=4000){}
 
When I uploaded the I2C_Scanner code to the teensy and connected it to the Arduino(SCL and SDA, since I am using Uno R3). It still does not work. No Connection found.
20220115_081056.jpg20220115_081143.jpg
 
I see the audio shield in your photo. Please be aware the audio shield will not respond to I2C without MCLK. The chip remains in a low power mode and simply can not work at all until it has a clock signal. To get it to answer, you need to include the audio library I2S output which turns on the MCLK signal, or you can use analogWriteFrequency() and analogWrite() to create a fake MCLK signal (even just a few MHz is enough).
 
Paul, the issue was that both, Uno and Teensy were used as I2C Masters. Yes that the shield was not found too is normal - but not the problem here.
 
Back
Top