# Help for beginner: Sensor display on Android phone

**URL:** <https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939>\
**Category:** Programming\
**Created:** [September 16, 2021, 1:23am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939 "2021-09-16T01:23:38Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![axlecky](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@axlecky](https://forum.arduino.cc/u/axlecky)\
**Post date:** [September 16, 2021, 1:23am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/1 "2021-09-16T01:23:38Z")

</div>

I'm currently doing a project where I'm using a capacitive sensor (DFRobot Gravity Non-contact liquid level sensor) to detect when water/fluid fills past a certain level in a container. The sensor is located outside of the container and an LED will light up when water has filled past the sensor. The coding for this part is as follows:

```cpp
/ ***************************************************
* Liquid Level Sensor-XKC-Y25-T12V
* ****************************************************
* This example is to get liquid level

* u/author jackli(Jack.li@dfrobot.com)
* u/version V1.0
* u/date 2016-1-30

* GNU Lesser General Public License.
* See <http://www.gnu.org/licenses/> for details.
* All above must be included in any redistribution
* **************************************************** /
int Liquid_level=0;
void setup() {
 Serial.begin(9600);
 pinMode(5,INPUT);
}

void loop() {
Liquid_level=digitalRead(5);
Serial.print("Liquid_level= ");
Serial.println(Liquid_level,DEC);
delay(500);
}

```

However, I also intend to use an android app (open to any suggested app) along with the HC-05 Bluetooth transceiver to display this sensor LED status on my phone. Can I get help for the coding with regards to this part? I'm completely new to Arduino coding.

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [September 16, 2021, 2:32am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/2 "2021-09-16T02:32:38Z")

</div>

> [@axlecky](#):
>
> I also intend to use an android app (open to any suggested app) along with the HC-05 Bluetooth transceiver to display this sensor LED status on my phone.

Kai Morich's [Serial Bluetooth Terminal] is a good phone app.  
([https://play.google.com/store/apps/details?id=de.kai\_morich.serial\_bluetooth\_terminal&hl=en\_US&gl=US](https://play.google.com/store/apps/details?id=de.kai_morich.serial_bluetooth_terminal&hl=en_US&gl=US))

Any program you write to send information to the Serial Monitor can be used to send information to the HC05 BT module.

After your program is loaded to the Arduino, you can connect the HC05 to the hardware serial pins 0/1 and the message from the Arduino will be sent to the monitor and the phone. Serial Input to the Arduino(which you may not require) will only be available from the phone.

---

<div class="post-metadata">

**Author:** ![axlecky](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@axlecky](https://forum.arduino.cc/u/axlecky)\
**Post date:** [September 16, 2021, 5:17am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/3 "2021-09-16T05:17:02Z")

</div>

Hi thanks for the reply! Will look into this and update u if it works

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [September 16, 2021, 7:01am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/4 "2021-09-16T07:01:57Z")

</div>

Further to Cattledog's comprehensive post, I submit that, if you are serious about a half second loop and view it live, you may be better of using a graphic terminal instead of Morich. I use that by CETIN. It also logs plain-vanilla text.

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [September 16, 2021, 8:25am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/5 "2021-09-16T08:25:48Z")

</div>

Hi axlecky.  
Are you interested in building your own Android phone app?

A very small app would achieve what you want to do. All it has to do is make the BT connection then continually read any data arriving via BT and display some symbol to indicate the level sensor status. There are lots of examples to guide you.

Most people use MIT App Inventor to build apps.

---

<div class="post-metadata">

**Author:** ![axlecky](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@axlecky](https://forum.arduino.cc/u/axlecky)\
**Post date:** [September 16, 2021, 9:10am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/6 "2021-09-16T09:10:02Z")

</div>

Hi thanks for the reply! Do you have any links to these examples?🙂 Thanks in advance!

---

<div class="post-metadata">

**Author:** ![axlecky](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@axlecky](https://forum.arduino.cc/u/axlecky)\
**Post date:** [September 16, 2021, 9:10am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/7 "2021-09-16T09:10:42Z")

</div>

Thanks! Will look into it as well:)

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [September 16, 2021, 10:38am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/8 "2021-09-16T10:38:08Z")

</div>

I did a quick search on "Arduino App Inventor Bluetooth app". The examples I found were more complicate than you need.

Take a look at this one:  
[BT app example](https://coldstreams.com/appinventor/2015/05/07/how-to-connect-app-inventor-apps-to-arduino-using-bluetooth-wireless/)

You could also search the Arduino forum as other people have discussed Arduino,BT & apps.

Your main task would be to learn MIT App Inventor. The app itself for your needs would be quite simple. That said, you still need to learn App Inventor.

Maybe follow Nick's & cattledog's advice first might be the best way to go.

---

<div class="post-metadata">

**Author:** ![Nick\_Pyner](https://avatars.discourse-cdn.com/v4/letter/n/e8c25b/32.png) [@Nick\_Pyner](https://forum.arduino.cc/u/Nick_Pyner)\
**Post date:** [September 17, 2021, 3:59am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/9 "2021-09-17T03:59:20Z")

</div>

> [@HillmanImp](#):
>
> follow Nick's & cattledog's advice first

It might save you from reinventing the wheel(!)

---

<div class="post-metadata">

**Author:** ![axlecky](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@axlecky](https://forum.arduino.cc/u/axlecky)\
**Post date:** [September 17, 2021, 6:29am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/10 "2021-09-17T06:29:48Z")

</div>

thanks!

---

<div class="post-metadata">

**Author:** ![HillmanImp](https://avatars.discourse-cdn.com/v4/letter/h/9d8465/32.png) [@HillmanImp](https://forum.arduino.cc/u/HillmanImp)\
**Post date:** [September 17, 2021, 7:15am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/11 "2021-09-17T07:15:26Z")

</div>

I've built an app to do what you want. It's simple enough. The screen at startup and the blocks are posted below.

But I must admit, I've been using App Inventor for over 12 months and when I started the concepts and terminology were confusing. Can be enjoyable though.

I haven't tested it. There'll probably be a bug or two. Can you make sense of any of it? Does it encourage you to dip into App Inventor?

 ![Water Level Monitor Screen](https://europe1.discourse-cdn.com/arduino/original/4X/c/3/b/c3bcc8da6302d2459ca6426b3cdec2ba022f4f6b.png)

 ![Blocks](https://europe1.discourse-cdn.com/arduino/original/4X/9/b/e/9be47dd2c09c028d5422c08abbd753de3b9bab3a.png)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [January 15, 2022, 7:15am UTC](https://forum.arduino.cc/t/help-for-beginner-sensor-display-on-android-phone/905939/12 "2022-01-15T07:15:27Z")

</div>

Closed on January 15, 2022, 7:15am UTC

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.
