Go Down

Topic: SparkFun Voice Shield (Read 5008 times) previous topic - next topic



I am working on a Robot with the voice shield and noticed all the event pins are connected to the speakjet. I am only using the serial interface the ready pin, can I use the other pins for other sensors or will it interfere with the speakjet since it is connected?



Sorry I can't respond with an answer but I am also trying to use the voicebox shield and have a similar "serial" based question so thought we might share any replies. I would like to control the voice box shield using the PC application from Magnevation called Phrase-a-lator. Most of the info I can find tells you how to do this using the PCs Serial connection (but I understand this needs more h/w to convert serial voltages down to levels that the precious little speakjet can handle! What i'd like to do is have Phrase-a-lator pass serial commands via usb to my Arduino (Duemilanove 328) and then have the Arduino relay these to the voice box shield. Sounds simple enough but when I looked into this I quickly got confused about how many "softserials" I need to run at the same time and whether using "softserial" or "newsoftserial" would interfere/conflict with data being passed via the serial interface via USB. Any guidance or advice on how to get started would be appreciated.


Jan 26, 2011, 10:20 pm Last Edit: Jan 27, 2011, 04:28 pm by MobileWill Reason: 1
What I did is use 1 software serial (either soft or new soft both work) and then listen on the serial for text. Then parse for codes and then send it to the speakjet. Not sure about your setup but I added the TTS (Text to speech) chip so I can send text and not have to create a word database. The TTS chip has it on broad and does the work for you. Not too hard to mod but the new voice shield uses SMD instead of SMT, you just have to be careful.

I used the sparkfun exmaple as a starting point. It doesn't parse for sounds codes though. If you need that I can send you the code I used. I just looked for a \ while reading incoming text and seperated the numbers after it. Then convert it to a int and put it inline in the message so the speakjet can receive it as a code and not char's.

Hope that helps.


Thanks for the reply. You don't say if you are using Phrase-a-lator to generate what is sent. That is the bit that is confusing me. Most of the examples I have seen use char strings that are hard coded into the arduino sketch as the source data for what to say. I'm looking to do something a bit more dynamic than that and be able to type in commands at my PC (using Phrase-a-lator) and have the voice box speak/play sounds as instructed. I'm clear on how to pass the commands from Arduino to the Voice box shield just not sure how I get the Arduino to read the data coming from Phrase-a-lator via the USB at the same time. If you could send me the code you used that might be a start. It sounds like you have got further than I have as I see you talk about looking for  a " \ " so I'm guessing that means in your code you are using escape code sequences to control the speakjet?


This is what I am using.


That way you can send any text.

Here is the code i used to get started

Right so I can send command codes to the speakjet. The TTS chip will pass them.


I have looked through the code in the links before. As I said I trying to use Phrase-a-lator and not a TTS chip so the code here doesn't really help me. The problem seems to be getting the Arduino to read what Phrase-a-lator sends via the USB connection. At the moment I have no idea how this data is put together. I had hoped to use the Serial Monitor with a simple read then print statement but because both the serial monitor and Phrase-a-lator have to be configured to use COM3 I can't do this. I can see that once I know what data is being transmitted I can write some code to interpret this into the right format to send to OUTPUT Pin 2 and into the RCX pin on the Speakjet. I have managed to get some sounds from SJ via Phrase-a-lator but this was only using the Synth control but this was a bit hit and miss, sometimes clicking on a command would cause a sound change , other times it wouldn't. Anyone know how I can see what Phrase-a-lator is sending to the Arduino?


Maybe you should post in a new thread.

Go Up