// SpeakJetTTS Hello World sketch // a demo showing a minimal sketch for the SpeakJet/TTS Shield // written by Galen Raben / www.droidbuilder.com //set up a SoftwareSerial port for Speakjet Shield //rxPin: the pin on which to receive serial data from TTS256 //txPin: the pin on which to transmit serial data to the TTS256 #include #define txPin 2 #define rxPin 3 SoftwareSerial sjSerial = SoftwareSerial(rxPin, txPin); void setup(){ // initialize the serial communications with the SpeakJet-TTS256 pinMode(rxPin, INPUT); pinMode(txPin, OUTPUT); sjSerial.begin(9600);// set the data rate for the SoftwareSerial port delay(1000); // wait a second for the Arduino resets to finish (speaks "ready") sjSerial.println("Hello world!"); // send it to the SpeakJet } void loop() {}