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

Thread: Prop Shield LC & Audio Playback

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Posts
    3

    Prop Shield LC & Audio Playback

    Hello Everyone;

    I have had a few round-about ways and some attempts at getting audio to play back through an LC prop shield from the onboard flash with a low-power/snooze function to save battery.

    Below is my very rough staged code in hopes to get any direction or help from anyone moving forward. I am hoping to use this thread to post some progress/updates from my work.

    My hardware: Teensyduino & Prop LC Shield LC & 3xAA batteries (~4.5v? input) the shield is soldered like:
    Click image for larger version. 

Name:	G7yyREH.jpg 
Views:	3 
Size:	72.2 KB 
ID:	15845
    Click image for larger version. 

Name:	gKovFs6.png 
Views:	3 
Size:	171.6 KB 
ID:	15846

    I can desolder them if need be, but wow is this thing a bit of a powerhouse and small *teensy?* when they are together!

    Code:
    //#Include libraries for Audio somehow from here: https://www.pjrc.com/teensy/td_libs_Audio.html ??
    //#Include libraries for PropLC memory ??
    //#Include libraries for low power state, example here: https://github.com/duff2013/Snooze ??
    
    void Setup(){
    
    //setup as many pins as possible as inputs
    
    // Would I initiate low power consumption or low power state as shown here: https://github.com/duff2013/Snooze ?
    // If so, I would need to get a wakeup function to get this going
    
    }
    
    void Loop(){
    
    if (pinX == HIGH){
    	//play audioFileX from LC Flash to (Speaker +) / (Speaker -) pins
     }
    else if (pinY == HIGH){
    	//play audioFileY from LC Flash to (Speaker +) / (Speaker -) pins
     }
    
    //
    // (all other singular pins in similar else-if statements)
    //
    
    else if (pinA && pin B == HIGH){
    	//play audioFileABC from LC Flash to (Speaker +) / (Speaker -) pins
     }
    }
    Super excited to try and get this working, but as you can probably tell I am struggling. Any help is greatly appreciated!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,882
    In general, the problem is the audio library that you normally use to play complex sounds uses instructions not available on the Teensy LC. You would need to move up to the Teensy 3.2 in order to use most of the audio library.

    Here is a post from 2015 talking about this issue:


    Looking further, it looks like Paul wrote this sketch that plays a single .WAV file on the LC, and a newer thread from 2018:

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Posts
    3
    You would need to move up to the Teensy 3.2
    Ah, my apologies. In the original post I should have stated, it is a 3.2 that I am working with, not a teensyduino.

    I will review the wav file example and report back!

    Thanks @MichaelMeissner for your input

  4. #4
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    2,882
    Quote Originally Posted by dash4g View Post
    Ah, my apologies. In the original post I should have stated, it is a 3.2 that I am working with, not a teensyduino.

    I will review the wav file example and report back!

    Thanks @MichaelMeissner for your input
    Yeah, I mis-read your article. I saw the LC, and forgot that there are two different Teensy LC's. The Teensy LC processor (which as I said is limited in terms of audio support) and the Teensy LC prop shield (which does not have the motion sensors, but does have the flash memory, amplifier, and voltage translation support). Sorry about that. If you have a 3.2, it is a lot simpler.

Posting Permissions

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