thefijimonster
Member
Hello all,
I have been working on my teensy 4.0 project that takes a signal from the line in pins from the audio shield and performs a spectrum analysis. However, I have been having trouble getting the Audio shield to work. I have soldered the pins in the correct orientation and made sure each connection is connecting the pin to the ring around the through-hole. I have not soldered anything apart from the main two rows of pins. I am connecting the Teensy 4.0 to my MacBook usb-c port via a usb-c to usb-a adapter. Here is the code that I am running to check whether the audio board is working properly. I am checking if the audio shield is able to enable or not.
A couple of things happen when running this code. Firstly, the serial output returns that the audio shield has failed to initialize. Secondly, the teensy 4.0 disconnects and disappears from the port (just after the LED light on the teensy blinks red). There is also sometimes a pop-up notification on my MacBook that says "USB Accessories Disabled – Unplug the accessory using too much power to re-enable USB devices". I would love to know if there is something obvious that I am doing wrong – I have soldered all the pins between the audio shield and the teensy 4.0. I am using the Arduino IDE setup as the initial "Download/Install" page on the pjrc website states. Any help/advice would be appreciated – please do let me know if you require any further information. Moreover, not sure if this is of any relevance, but when measuring the DC voltage between GND and any of the pins from the 3.5mm jack component, there is no voltage registered. I saw somewhere that this is the case if there is no audio signal passing through to this component – is that the case?
I am thinking that this could be an issue with how the teensy is connected to the MacBook and maybe it should be connected through a powered USB hub? Does this sound like a software issue more than a hardware issue?
Thanks in advance for your help – I hope I can get this to work soon as it is for an upcoming deadline!
I have been working on my teensy 4.0 project that takes a signal from the line in pins from the audio shield and performs a spectrum analysis. However, I have been having trouble getting the Audio shield to work. I have soldered the pins in the correct orientation and made sure each connection is connecting the pin to the ring around the through-hole. I have not soldered anything apart from the main two rows of pins. I am connecting the Teensy 4.0 to my MacBook usb-c port via a usb-c to usb-a adapter. Here is the code that I am running to check whether the audio board is working properly. I am checking if the audio shield is able to enable or not.
C++:
#include <Audio.h>
#include <Wire.h>
AudioSynthWaveform waveform1;
AudioOutputI2S i2s1;
AudioConnection patchCord1(waveform1, 0, i2s1, 0);
AudioConnection patchCord2(waveform1, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;
void setup() {
Serial.begin(115200);
Serial.println("Initializing...");
if (sgtl5000_1.enable()) {
Serial.println("Initialized audio shield");
} else {
Serial.println("Failed to initialize audio shield");
}
}
void loop() {
// Main loop code
}
A couple of things happen when running this code. Firstly, the serial output returns that the audio shield has failed to initialize. Secondly, the teensy 4.0 disconnects and disappears from the port (just after the LED light on the teensy blinks red). There is also sometimes a pop-up notification on my MacBook that says "USB Accessories Disabled – Unplug the accessory using too much power to re-enable USB devices". I would love to know if there is something obvious that I am doing wrong – I have soldered all the pins between the audio shield and the teensy 4.0. I am using the Arduino IDE setup as the initial "Download/Install" page on the pjrc website states. Any help/advice would be appreciated – please do let me know if you require any further information. Moreover, not sure if this is of any relevance, but when measuring the DC voltage between GND and any of the pins from the 3.5mm jack component, there is no voltage registered. I saw somewhere that this is the case if there is no audio signal passing through to this component – is that the case?
I am thinking that this could be an issue with how the teensy is connected to the MacBook and maybe it should be connected through a powered USB hub? Does this sound like a software issue more than a hardware issue?
Thanks in advance for your help – I hope I can get this to work soon as it is for an upcoming deadline!