Go Down

Topic: How to send data from hc-06 to android app? (Read 452 times) previous topic - next topic

brodin25

Sep 05, 2017, 05:36 pm Last Edit: Sep 05, 2017, 06:18 pm by brodin25
I want to create an app that if LED is on or off using a push button, it will display at the app. Can anyone please help me with the coding for the arduino & how to make the app using mit app inventor 2? Thank you :)

PaulS

Quote
Can anyone please help me with the coding
What does this have to do with the Arduino web site? The Arduino forum?

How did the LED get to be on? Off? Reading the state of the switch is trivial - digitalRead(). Sending data is usually done using Serial.print(), IF there is some way to get the serial data to to the Android, such as a properly paired bluetooth device.

Writing the code for the Android is NOT something you'll get help here doing. The Android forum won't help you write Arduino code, either.
The art of getting good answers lies in asking good questions.

brodin25

Because i am using arduino for the hc-06 bluetooth module. i just want to know what is the coding to send the data from the hc-06 if the LED is on.

Code: [Select]
if (LED == HIGH)

What do i need to write after that to send the data from hc-06?

PaulS

Quote
What do i need to write after that to send the data from hc-06?
From the hc-06? I'd expect you to send data TO the hc-06.
The art of getting good answers lies in asking good questions.

Nick_Pyner

Bluetooth just passes along what it receives. Arduino is not sending data to bluetooth. It is  sending data to the serial port, and bluetooth just happens to be the item connected to the other side. Arduino neither knows nor cares what is connected, if anything, and the code is the same. All you need do is ensure the code is sent at the rate at which Bluetooth is set to receive it.

horace

have a look at
http://www.instructables.com/id/Add-bluetooth-to-your-Arduino-project-ArduinoHC-06/

Go Up