Go Down

Topic: SpeakJet /TTS Serial Question (Read 9 times) previous topic - next topic

PaulS

ASCII code 253 (375 in base 8) does not correspond to a key you can type, like A, f, 5, or @. So, you have to define the code as \375, which is not the same as '\', '3', '7', '5'.

When the Arduino reads '\', '3', '7', and '5' from the serial port, it needs to see that as an escape sequence, and print something different to the speaker chip.

You keep saying "yeah, I know that", but you have not shown any code that understands that \ is the start of an escape sequence, rather than just another character.

Do you have such code that you are unwilling to share, or do you not understand that YOU have to write such code?

MobileWill

#6
Jan 23, 2011, 08:49 pm Last Edit: Jan 23, 2011, 08:49 pm by wgarrido Reason: 1
I guess I am not understanding correctly. So I have to parse the array and look for \ and interpret it that? I thought the TTS would take care of that since the direct println works.
Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

PaulS

Quote
I thought the TTS would take care of that since the direct println works.

No, the compiler does the parsing when storing the data in memory. You need to do the parsing in your code for the serial input.

MobileWill

Current Projects:                    Arduinos:
Security Robot Tank               Uno
Security Robot II 4WD            Mega2560

http://mobilewill.blogspot.com

PaulS

Quote
What would I convert it to?

Probably from octal to decimal, and use the speaker.write() function (hopefully there is one) to send the decimal value.

See if there is a write() function. If there is, try writing 253 to the chip, in setup() or loop(), to see that it processes the value correctly.

Go Up