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

Thread: Connect earphones to Teensy

  1. #1
    Junior Member
    Join Date
    Jan 2022
    Posts
    10

    Connect earphones to Teensy

    I would like to connect earphones to the Headphone port of a laptop. Instead of using the earphones directly for audio output, I would like to connect the Left/Right channel wires of the earphones to the teensy. The goal is to capture the frequency(actually peak frequencies) from audio coming from the computer?

    Can this be done? If so, can you provide a link to other projects that havedone this or suggestion how to set this up. I am a newbie but I catch on quickly.

  2. #2
    Junior Member
    Join Date
    Dec 2021
    Location
    Munich, Germany
    Posts
    9
    hi,
    mainly look here: https://www.pjrc.com/store/audio_tutorial_kit.html
    By help of the tutorial, you will find all you need...
    If your decision is only to connect an audio source to Teensy, you must use an analogue input with a bias-supply like the little drawing shows.
    Click image for larger version. 

Name:	Analog IN.jpg 
Views:	9 
Size:	14.1 KB 
ID:	27099
    With 'analogRead(analogPIN)' you will get digital values between 0 and 1023 correspondent to input voltage. Silence will show '512'.
    have fun!

  3. #3
    Junior Member
    Join Date
    Jan 2022
    Posts
    10
    Thank you for your response. What I don't understand is, the earphones have a left and right channel. I don't know where these two wires should be connected on the Teensy.

  4. #4
    Junior Member
    Join Date
    Dec 2021
    Location
    Munich, Germany
    Posts
    9
    hi Sheon,
    Teensy himself is not able to process audio streams. You can digitize audio like shown with my little scheme. It's not HIFI....
    Real audio processing needs an audioshield to be added. Take a look to the link I provided. With audioshield teensy is able to do many things with audiostreams. The audio library just has a lot of examples.

  5. #5
    Junior Member
    Join Date
    Jan 2022
    Posts
    10
    Got it. Thank you.

Posting Permissions

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