Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Teensy 4.1 with audio shield questions

  1. #1
    Junior Member
    Join Date
    Jul 2020

    Teensy 4.1 with audio shield questions

    I am using the teensy 4.1 with the audio shield (made sure it was the correct one for this board) and I cannot get the input working properly. I am simply trying to have it write the rms of the input signal to the serial output but its reading 0.00 no matter what, I verified the audio signal is coming cleanly with a speaker so there is not issue there. Here is my wiring:

    Click image for larger version. 

Name:	audiocircuit1.jpg 
Views:	359 
Size:	122.4 KB 
ID:	20854

    The code I am using is:

    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>

    // GUItool: begin automatically generated code
    AudioInputI2S SHIELD_INPUT; //xy=175,217.00000286102295
    AudioAnalyzeRMS rms1; //xy=552.0000076293945,350.00000190734863
    AudioConnection patchCord1(SHIELD_INPUT, 0, rms1, 0);
    AudioControlSGTL5000 sgtl5000_1; //xy=378,446
    // GUItool: end automatically generated code

    void setup() {
    // put your setup code here, to run once:


    void loop() {
    // put your main code here, to run repeatedly:

    I wired it based on the diagram for the 4.X audio shield on the product page. I am using the arduino 1.8.12 with the teensy add on as well as the audio system design tool (using i2s for the shield input directly to an RMS node).

    Am I missing some steps? I am unsure how to verify if the audio shield is even working at all. Any help would be greatly appreciated, I am struggling to find answers.

    Best wishes.

  2. #2
    Junior Member
    Join Date
    Sep 2014
    For starters, there needs to be a line in setup() to allocate memory for the Audio Library. Something like:


    Try one of the examples, e.g. Pass Through Stereo, to see if the shield is working.

    hope this helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts