Arduino + Bluetooth + Android Module

I am trying to come up with a way to make a simple home automation project that includes an Arduino, a Bluetooth module and an Android phone. The idea is that I have two Arduino boards in different parts of my house. And if I enter the room, then the LED that my phone has detected appears on the board. If I go out of the Bluetooth range, the LED should turn off.

I tried the DomoticHome project with a router, but it is only for manual on / off, and it is based on the Ethernet module.

I don’t want to make an Android application from scratch, but I would like to use some existing open source application that I could expand to use Bluetooth and / or automatically turn on the LED.

+8
android bluetooth arduino
source share
2 answers

Actually, you can skip this requirement of the Android application. Make your Arduino l2ping board regularly with your phone via Bluetooth and switch your LED based on success or failure.

As a side effect, you can only automate using any phone that supports Bluetooth. But the devil is in the details. It may be necessary to assemble the boards and phone first.

In addition, most Android phones turn off visibility in a minute or two. So you will need to check if ping will work. (I don't know if l2ping is available on the Arduino out of the box, but it should be easily portable.) Trying to open the Bluetooth port on your mobile device may be an alternative to l2ping. Therefore, there should be no applied solution.

+2
source share

The best way to do this is to use a handshake every 1 second or 2 seconds. the bluetooth module must send HI if the mobile accepts that I have to answer HI. As soon as the mobile phone does not answer, it should turn on the light off .. If it receives HI, it should turn on the light again. I have a code that can connect to these bluetooth modules using serial communication .. very easy to use. I will check and send you the code. All the best..

0
source share

All Articles