ArminJo / Talkie

Refurbished Arduino version of the Talkie library from Peter Knight.
GNU General Public License v3.0
214 stars 52 forks source link

Use regular PWM on Teensy #10

Closed grapefrukt closed 4 years ago

grapefrukt commented 4 years ago

Hey,

I'm trying to make this library play nice with the Teensy Audio library, which I have set up to use the DAC on my Teensy 3.2.

It's not especially clear to me how I initialise Talkie to stay away from that pin and use a regular old PWM pin. I can use beginPWM(), but it also seems that initializeHardware()which runs before anything it output (I think?) is eager to use the DAC anyway.

Is there a way to do this?

(Ideally, I'd mix the Talkie output into the Teensy Audio library, but that's a bridge I'll cross another day)

ArminJo commented 4 years ago

Try to outcomment line 125 ff.

#  if defined(__MKL26Z64__) // Teensy LC
#  define DAC_PIN A12

and look at line 259 ff. #elif defined(TEENSYDUINO)

grapefrukt commented 4 years ago

I decided to sidestep this issue and use samples instead, so I won't be digging deeper into this. Thanks for your help so far and sorry for bothering you!