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

Thread: Teensy 3.2 & Prop LC: Toy audio reconstruction

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

    Teensy 3.2 & Prop LC: Toy audio reconstruction

    A few weeks ago I posted this to the Arduino forum:

    In a nutshell, I am trying to change the voice of toys to a different language.

    There are many toys I am hoping to change, but I am looking to re-purpose the:
    • Battery pack (often 3x AA batteries)
    • Built-in speaker
    • Inputs (buttons, switches)
    That forum led me to the Teensy and a Prop Shield LC. I now have them wired like this:




    with the boxes in red showing the thru pins:


    This is my attempt to utilize the LC shield memory/audio capabilities and maximize the other pins as inputs.

    Right now, I am doing my best to find some example code to get to a point where I can begin to write code such as:

    Code:
    if (pin X)
    {
      // play Audio File A from LC shield
    }
    else if (pinY & pinZ)
    {
      // play Audio File B from LC shield
    }
    else
    {
      // do Thing C
    }
    Eventually I would love to utilize a button matrix to absolutely maximize the inputs, however I am just trying to get this working with this setup.

    Many of the examples I have viewed seem to utilize the Audio toolkit as shown here:
    https://www.pjrc.com/teensy/td_libs_Audio.html

    ...and I believe I am meant to be converting the audio files to a raw data format for the teensy to read? but I cant find a specific example with the teensy and Prop board LC... and I would appreciate any help to point me in the right direction!
    Thanks!

  2. #2
    Senior Member+ MichaelMeissner's Avatar
    Join Date
    Nov 2012
    Location
    Ayer Massachussetts
    Posts
    3,679

    Cool

    For simple sounds that are stored in the Teensy's memory, look at the example Audio -> SamplePlayer. It has 5 buttons and it will play different sounds depending on the button press.

    If you need more memory, the LC shield has a 8MB flash area that you can use to record songs. Frank B wrote a tool called Teensy Transfer that will allow you to download files to the flash memory. You load up a Teensy sketch, and run a program on your host side that talks to the Teensy:


    The example program SerialFlash -> MP3Player will play a single song from the flash memory. You will need Frank B's MP3 player code:

Posting Permissions

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