smart home Arduino project with Android

Hello Please I need some help because I’m trying to design an application that can control a smart home with an Arduino controlled with a smart phone (I did the application using MIT app inventor).

An application that allows me to control the opening and closing of shutters, lighting of the house, a sensor to measure the temperature and humidity (DHT11).

But I have a problem with the temperature display and humidity as it appears on the same label and what should I do to display the temperature in a label and humidity to another label? Thank you kindly help me
Here is my program:

You want someone to help you with your MIT App Inventor code ? ? ?

This is the wrong forum.

I may be missing a lot of data but from what I see you have the following problems.

You are receiving data from Bluetooth only when NOT connected.
You are copying all the received data to label3.
You don’t need to keep setting Label1 and Label2 in the timer function.

Do you really need separate labels to say connected or disconnected. I would suggest using one label only and only updating when a connection is made or not made rather than constantly within the clock function.

Move the BluetoothClient.RecieveText block up to the if then section. So if bluetooth is connected, see if there is any data.

You need to separate or parse the received data. Read the data in to a variable, separate it in to temp and humidity, then put these 2 values in to the correct labels. This is not so easy with the way you are sending the data; 2 floats. Reformat the values on the Arduino before sending them. I would normally use comma separated values contained in start and end markers. I would also convert the numbers to ascii. For example, “<TEMP,25.6><HUMID, 67%>”. The AI app will auto convert “25.6” in to the value 25.6 or you can just copy it to a label within the app.

See Robin2’s post on serial basics

This kind of thing has been addressed several times over at the AI2 forums. See here