Bluetooth connection between arduino and a mobile device, HC05 module, Android Studio(JAVA)

Viewed 120

I am trying to create a Bluetooth communication connection between an Arduino and an Android device, the app monitors the level of liquid from a barrel and if needed the app can also turn off the water flow, can I make the Arduino also receive and send data to the mobile device? If yes how. I appreciate any documentation regarding this, I am thinking of using an HC05 Bluetooth module for communication, I am currently using Android Studio.

2 Answers

The HC05 is a Bluetooth Classic (sometimes called Bluetooth Serial) module. It can be used as Master or Slave in a Bluetooth communication. The Bluetooth Overview of the Android Developer Guide will give you a good starting point.

You probably want to use the HC05 as Slave and your phone as Master. The Master is able to search for other Bluetooth devices and connect to up to 7 Slaves at the same time. After you established your connection you can read from and write to the device.

I would recommend to start with your arduino side. You can verify the functionality using existing apps such as Serial Bluetooth Terminal. If the arduino works as expected you can develop your own app.

Related