Hi,
I tried to use the TTS.h with an Arduino UNO. The exeampl software. was running. It is not great, but it functions. My problem now is that I have to work with a Mega2560. Cause I use other shields too I have to use Pin 10 as chipselect pin (for the SDCard-Shield). So TTS will not run on my Mega. What do I have to change in TTS.h and/or TTS.cpp to solve my problem? I have changed wprogram.h to arduino.h.
Is there anybody who has an idea and can help me?
Cause I use other shields too I have to use Pin 10 as chipselect pin (for the SDCard-Shield).
Why? The SD class does not care which pin you use for the chip select pin.
What do I have to change in TTS.h and/or TTS.cpp to solve my problem?
Probably nothing. Just use a different pin for the SD card. If you do need to move the pin that the TTS library uses, and that is even possible, just change whatever references pin 10 in the library that you didn't post the link to.
class TTS {
public:
/**
* constructs a new text-to-speech
* pin is the PWM pin on which audio is output
* (valid values: 9, 10, 3)
*/
TTS(int pin = 10);
Right in the top of the.h. same answer to the other poster with the same question.