How to send data via Bluetooth from Arduino to Android App(gnrtd by Processing)

Hello , i generated an android application using Processing in order to control Stepper motor and Bulb through Buttons. via Bluetooth HC-05
So far i just have sent data to Arduino via bluetooth module. now i want to get data from arduino , for instance temperature information , i want to get value from arduino and display it on my Processing android app .
in first case , i used to Bluetooth module in SLAVE mode . i think in second case ( i mean get data from arduino for temperature)
i must use bluetooth module in Master mode . my main question is i dont know Can i use bluetooth module in SLAVE and MASTER mode simultaneously ?

blueToothSerial.print("\r\n+STWMOD=0\r\n");/ set the bluetooth in slave mode

thanks in advance

Can i use bluetooth module in SLAVE and MASTER mode simultaneously ?

The short answer is probably no, but I don't think you need the bluetooth to be master anyway. Android is the master and you only need one. I doubt the involvement of Processing changes anything. If it does, there are plenty of apps that don't, which will probably make life easier.

thanks for replying , so you say i dont need to change anything(slave or master ) , i 'll try to get data from sensor and assignment a variable , then define in Processing sketch and display it how ever I want . im right ?

Please don't post the same thing in numerous places. Post 1 time, have some patience.
Duplicate post is being deleted.

im sorry but i thought second title is more suitable for my issue . i will be careful much more .

burakozen:
thanks for replying , so you say i dont need to change anything(slave or master ) , i 'll try to get data from sensor and assignment a variable , then define in Processing sketch and display it how ever I want . im right ?

As far as Arduino is concerned, at most it is

Get sensorReading;
var =  sensorReading;
Serial.println (var);

or the like. No master needed.

:frowning: okay i can print the variable to serial monitor . but i dont know how to get it on android application via bt . i attached my processing code . Please help me about what to add the sketch.

yenibutoneklenmishali.pde (11.4 KB)

burakozen:
Please help me about what to add the sketch.

It all looks too complicated to me and deletions might be more in order than additions. This background might be useful.

http://homepages.ihug.com.au/~npyner/Arduino/GUIDE_2BT.pdf
http://homepages.ihug.com.au/~npyner/Arduino/BT_2_WAY.ino