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

Thread: Can't get signal into AudioInputAnalog on teensy3.0

  1. #1
    Junior Member
    Join Date
    May 2016
    Location
    Nice France, (but I'm British)
    Posts
    5

    Can't get signal into AudioInputAnalog on teensy3.0

    Hi, I can't seem to get audio into teensy3.0. (analog pin A2)
    Is the AudioInputAnalog object supported by teensy3.0?

    I've created a custom pcb folowing the schematic presented in the GUI.
    I have connected Agnd and ground (not sure why). Could that prevent the AudioInputAnalog object from working?

    I'll try disconnecting the traces linking Agnd and Gnd or breadboarding a new input circuit,
    but first wanted to check that is wasn't a teensy3.0 thing

    For code I'm using this (pt8211 works fine)

    // GUItool: begin automatically generated code
    AudioInputAnalog adc1; //xy=272,262
    AudioOutputPT8211 pt8211_1; //xy=534,301
    AudioConnection patchCord1(adc1, 0, pt8211_1, 0);
    AudioConnection patchCord2(adc1, 0, pt8211_1, 1);
    // GUItool: end automatically generated code

    Thanks in advance
    Alex

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,934
    Please post the complete program, even if it seems trivial. "Complete" means it can be copied into Arduino and I can upload it to a Teensy 3.0 here.

  3. #3
    Junior Member
    Join Date
    May 2016
    Location
    Nice France, (but I'm British)
    Posts
    5
    Thanks for your response, sorry here is the full code
    and here is the schematic I'm working with https://ibb.co/iQxqbw

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

    // GUItool: begin automatically generated code
    AudioInputAnalog adc1; //xy=272,262
    AudioOutputPT8211 pt8211_1; //xy=534,301
    AudioConnection patchCord1(adc1, 0, pt8211_1, 0);
    AudioConnection patchCord2(adc1, 0, pt8211_1, 1);
    // GUItool: end automatically generated code



    void setup() {
    // Audio connections require memory to work. For more
    // detailed information, see the MemoryAndCpuUsage example
    AudioMemory(12);
    }

    void loop() {
    // Do nothing here. The Audio flows automatically

    // When AudioInputAnalog is running, analogRead() must NOT be used.
    }

    Thanks
    Alex

  4. #4
    Junior Member
    Join Date
    May 2016
    Location
    Nice France, (but I'm British)
    Posts
    5
    Solved! I breadboarded the circuit and all is fine, must be something up with my PCB. ADC Audio in working fine on Teensy 3.0!

Posting Permissions

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