arduino to android code pls help

actually i have to submit this project on tuesday.
so thats the reason im stressed out so far.

just now i have checked it with an app
and asyou said written the code( BTserial.print();
but im unable to get any voice from the app?

my bluetooth connection is working.

shrikant_arts:
actually i have to submit this project on tuesday.
so thats the reason im stressed out so far.

no comment :slight_smile:

just now i have checked it with an app
and asyou said written the code( BTserial.print();
but im unable to get any voice from the app?
my bluetooth connection is working.

You need to be more specific. This will also help you to trouble shoot more systematically.
You have not explained what you mean with „checked it with an app“. I assume you mean a serial terminal app? I assume you mean you are able to receive serial text on your android phone? Was the check successful or not?
If not - are you able to receive serial text on your PC?
If not - have you tried with the hardware serial?
If not - have you tried with the bluetooth example sketches?

my bluetooth connection is working

What does that mean? Was the pairing successful? Was the serial transmission successful?

Take it step by step.
First make sure the serial is actually working. Only when you are 100% sure about this, then you can start to worry about the TTS app. BTW, this TTS app has not been updated for 4 years. Who knows if it still works on your android. Check the baud rate settings on the TTS app. Contact the developer of the app.

yes yes the app is getting connected, and msg is sent from arduino to app.

i have checked out with one of the app .

i took a refrrence from this siteto see whether im able to get text on app or not.
and yes it perfect worked.

but when im trying the same thig with the TTS app,
it doesnt work

shrikant_arts:
i have checked out with one of the app .
http://www.instructables.com/id/How-to-Receive-Arduino-Sensor-Data-on-Your-Android/

i took a refrrence from this siteto see whether im able to get text on app or not.
and yes it perfect worked.

Okay, this is good news. So on the arduino / bluetooth module side, everything is okay.

but when im trying the same thig with the TTS app,
it doesnt work

It could be a problem with the settings of the TTS app. What kind of settings does it have?
baud rate?
serial port?
android TTS engine?

You could try to send serial messages to your android phone from your PC, and see if the TTS app responds.

From this point on, I don‘t think you will find much help in the arduino forum anymore, since you have now narrowed down the problem to the interaction between the android bluetooth serial port and the TTS app.

Try another serial -> TTS app.

Check out the source code of the TTS app. Follow the link in the google play store. It takes you to GitHub.

Even if you can‘t get it to work - do a proper documentation about all the research and troubleshooting you have done to isolate the problem. This will impress your teacher more than some working setup, which you don‘t even understand why it works. Anybody can download an app. But not anybody can find and fix problems.

Good luck.
Thomas

hydrocontrol:
It could be a problem with the settings of the TTS app. What kind of settings does it have?
baud rate?
serial port?

I think this is a blind alley. These adjustments are not available at the Android end. If Bluetooth is working, it's working. No grey areas. As I said before, this can be proven with a standard Bluetooth terminal.

The last card in the pack at the Arduino end may be the formatting of the text, whereby anything will work on a terminal but the TTS is more particular. If this is the case, there should be a note to that effect with the TTS app.

Failing that, the last par in reply #23 is a really good idea.

yeah thankyou, guys,
il soon update about this.

helllo, i have with adding the
BTserial.print("");

statement.
but unable to get anything :frowning:

You said

shrikant_arts:
my bluetooth connection is working.

Is this true?
Have you tried sending your data to a standard Bluetooth Terminal? If that works, it is not a bluetooth problem, and may not be an Arduino problem.

Assuming the output was useable by TTS, there was nothing fundamentally wrong with your code as posted, it was just your error in application. You had two options.

  1. change bluetooth to pins 0,1, which I assume you ignored. It was not even necessary to edit the code.
  2. rewrite the code to use software serial in the proper manner
    Doing both is not an option.

yes Bluetooth is working.

I hae checked with another app, whre you send data from Arduino and displays data in the app.
that worked.

here I don't why it isn't working.
though the Bluetooth connection is established.

can i get a refresed code so that i can edit in a proper way.
i did this thrice.

n the app should should recieve in the form of voice
even that is nt working.

any TTS code is neccesary in the arduiono code?

If you want to stop poking in the dark, you need to clarify, whether the problem is on the arduino side or on the android side. If you are not sure about this, you will waste your time, and ours.

So - forget the arduino for now. Connect your PC via bluetooth to your android. Send serial messages from the PC serial terminal app to the android serial app (NOT the TTS app).
Does this work?
If no, get your settings on the terminal apps right. This MUST work.

If serial comminication works: send these serial messages to the TTS app. Does this work?
If no, there could be several reasons: TTS app maybe expects newline or return at the end of every word? Maybe your android text to speech engine is not working (this is independent of the TTS app!)? Try another TTS app to verify this.

If yes: then you at least know that the TTS app works in principle. Now there must be a difference between the type of message from your PC (they work) and the type of message from your arduino (they don‘t work). Compare the serial messages, look at hidden characters, etc.
Contact the author of the TTS app.

Okay, to be honest with you: You keep saying that it doesn‘t work, but you are not trying systematically to find the problem. It‘s your job now. Give us the answers to all of the above tests, if you want more help.

Thomas

shrikant_arts:
yes Bluetooth is working. I hae checked with another app, whre you send data from Arduino and displays data in the app. that worked.

any TTS code is neccesary in the arduiono code?

In view of the fact that everything else is working, then quite possibly. It seems clear that there is nothing wrong with bluetooth, the connection procedures, or the wiring, and the only problem is that the Android app is not getting the data it needs to get because, as I said in reply #24, you're not sending it properly. This may be just a matter of formatting.

This may be just a matter of formatting.

maybe it‘s a simple as a space after every word. The TTS app needs to know where the end of the word is.